From ff5ce218b5d1cebfaedac1dc61e2fd0de512258e Mon Sep 17 00:00:00 2001 From: phil Date: Fri, 15 Mar 2024 04:13:54 +0530 Subject: [PATCH] Fix model info --- src/gisaf/api/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gisaf/api/main.py b/src/gisaf/api/main.py index bbd6ee8..9ce11dc 100644 --- a/src/gisaf/api/main.py +++ b/src/gisaf/api/main.py @@ -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?