From 8409378e00a2cdd7e79cf5b0724585c05f091a35 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 9 Mar 2019 18:55:58 +0100 Subject: [PATCH] Fix a race condition when creating config.key_to_id --- openslides/core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/core/config.py b/openslides/core/config.py index 7f4cfbd6d..74c6615bc 100644 --- a/openslides/core/config.py +++ b/openslides/core/config.py @@ -68,9 +68,9 @@ class ConfigHandler: This uses the element_cache. It expects, that the config values are in the database before this is called. """ - self.key_to_id = {} all_data = await element_cache.get_all_full_data() elements = all_data[self.get_collection_string()] + self.key_to_id = {} for element in elements: self.key_to_id[element["key"]] = element["id"]