Fix model info

This commit is contained in:
phil 2024-03-15 04:13:54 +05:30
parent e377c014a7
commit ff5ce218b5

View file

@ -333,9 +333,8 @@ async def get_model_info(
]
## Add information about values
values_model = registry.values_for_model.get(model)
assert values_model is not None
# FIXME: one the first values_model is managed
if len(values_model) > 0 and hasattr(values_model[0], 'values'):
if values_model is not None and len(values_model) > 0 and hasattr(values_model[0], 'values'):
model_info['values'] = [ModelValue(**values) for values in values_model[0].values]
## Add information about tags
## TODO: add to plugin_manager a way to retrieve tag_store/tag_actions from a dict?