Merge pull request #4488 from ostcar/fix_config_key_to_id
Fix a race condition when creating config.key_to_id
This commit is contained in:
commit
023eb54773
@ -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"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user