mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 21:15:13 +00:00
Fix dynamic config cache serialization (#1075)
* Fix dynamic config cache serialization * Fix lint
This commit is contained in:
@@ -48,7 +48,8 @@ async def _load_config(
|
||||
if not dynamic_config:
|
||||
return
|
||||
|
||||
configs = {dc['key']: dc['value'] for dc in select_list_serialize(dynamic_config)}
|
||||
config_list = select_list_serialize(dynamic_config) if hasattr(dynamic_config[0], '__table__') else dynamic_config
|
||||
configs = {dc['key']: dc['value'] for dc in config_list}
|
||||
if configs.get(status_key, '1') == '0':
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user