From 5786e3d575b89730826b8c2099161b27d7d96a5b Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Thu, 4 Jan 2024 15:08:12 +0000 Subject: [PATCH] Make conferences a top-level list --- agenda/conference.py | 5 +---- web_view.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/agenda/conference.py b/agenda/conference.py index c1939ea..13d6a42 100644 --- a/agenda/conference.py +++ b/agenda/conference.py @@ -52,8 +52,5 @@ def get_list(filepath: str) -> list[Event]: url=conf.url, going=conf.going, ) - for conf in ( - Conference(**conf) - for conf in yaml.safe_load(open(filepath, "r"))["conferences"] - ) + for conf in (Conference(**conf) for conf in yaml.safe_load(open(filepath, "r"))) ] diff --git a/web_view.py b/web_view.py index 4f07b43..843cb9c 100755 --- a/web_view.py +++ b/web_view.py @@ -110,7 +110,7 @@ def conference_list() -> str: """Page showing a list of conferences.""" data_dir = app.config["PERSONAL_DATA"] filepath = os.path.join(data_dir, "conferences.yaml") - item_list = yaml.safe_load(open(filepath))["conferences"] + item_list = yaml.safe_load(open(filepath)) today = date.today() for conf in item_list: conf["start_date"] = as_date(conf["start"])