From 85903dbb4432b57c91c73a8734737eb43823f842 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Thu, 28 Feb 2019 09:09:32 +0100 Subject: [PATCH] Hotfix for #4408 --- openslides/agenda/projector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openslides/agenda/projector.py b/openslides/agenda/projector.py index 8913fa907..60b2d4252 100644 --- a/openslides/agenda/projector.py +++ b/openslides/agenda/projector.py @@ -28,11 +28,12 @@ def get_flat_tree(all_data: AllData, parent_id: int = 0) -> List[Dict[str, Any]] # Build a dict from an item_id to all its children children: Dict[int, List[int]] = defaultdict(list) - for item in sorted( - all_data["agenda/item"].values(), key=lambda item: item["weight"] - ): - if item["type"] == 1: # only normal items - children[item["parent_id"] or 0].append(item["id"]) + if "agenda/item" in all_data: + for item in sorted( + all_data["agenda/item"].values(), key=lambda item: item["weight"] + ): + if item["type"] == 1: # only normal items + children[item["parent_id"] or 0].append(item["id"]) tree = []