From dc7ca5e2c426d5f5fbbe64483135742ca7f7e09e Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Fri, 24 Aug 2018 12:14:02 +0200 Subject: [PATCH] fix empty values in rest --- openslides/utils/collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openslides/utils/collection.py b/openslides/utils/collection.py index d0555a3ea..6471e4092 100644 --- a/openslides/utils/collection.py +++ b/openslides/utils/collection.py @@ -284,8 +284,8 @@ class Collection(Cachable): all_full_data = self.get_elements_from_db() else: all_full_data = async_to_sync(element_cache.get_all_full_data)() - self.full_data = all_full_data[self.collection_string] - return self.full_data + self.full_data = all_full_data.get(self.collection_string, []) + return self.full_data # type: ignore def as_list_for_user(self, user: Optional[CollectionElement]) -> List[Dict[str, Any]]: """