diff --git a/backend/gn_module_monitoring/modules/repositories.py b/backend/gn_module_monitoring/modules/repositories.py index 3d225d1aa..09e56de48 100644 --- a/backend/gn_module_monitoring/modules/repositories.py +++ b/backend/gn_module_monitoring/modules/repositories.py @@ -4,7 +4,7 @@ get_modules """ -from sqlalchemy.orm import Load, joinedload +from sqlalchemy.orm import Load from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound from geonature.utils.env import DB @@ -93,9 +93,7 @@ def get_modules(): # Raise load not to load any other thing than # medias and categories # datasets are not required - Load(TMonitoringModules).raiseload("*"), - joinedload("medias"), - joinedload("categories"), + Load(TMonitoringModules).raiseload("*") ) .order_by(TMonitoringModules.module_label) .all() diff --git a/backend/gn_module_monitoring/routes/data_utils.py b/backend/gn_module_monitoring/routes/data_utils.py index 9040bf8a3..3a160a7bc 100644 --- a/backend/gn_module_monitoring/routes/data_utils.py +++ b/backend/gn_module_monitoring/routes/data_utils.py @@ -244,4 +244,4 @@ def get_util_from_ids_api(type_util, ids): return [r.as_dict() for r in res] # renvoie une chaine de caratère - return separator_out.join([r[0] for r in res]) + return separator_out.join([r[0] for r in res]) \ No newline at end of file