diff --git a/backend/gn_module_monitoring/routes/site.py b/backend/gn_module_monitoring/routes/site.py index 9a375aa9e..08f922307 100644 --- a/backend/gn_module_monitoring/routes/site.py +++ b/backend/gn_module_monitoring/routes/site.py @@ -146,9 +146,9 @@ def get_site_by_id(scope, id, object_type): raise Forbidden(f"User {g.current_user} cannot read site {site.id_base_site}") schema = MonitoringSitesSchema() response = schema.dump(site) - response["cruved"] = get_objet_with_permission_boolean([site], object_code="MONITORINGS_SITES")[0][ - "cruved" - ] + response["cruved"] = get_objet_with_permission_boolean( + [site], object_code="MONITORINGS_SITES" + )[0]["cruved"] response["geometry"] = json.loads(response["geometry"]) return response diff --git a/backend/gn_module_monitoring/routes/sites_groups.py b/backend/gn_module_monitoring/routes/sites_groups.py index 0c5db1de8..701476700 100644 --- a/backend/gn_module_monitoring/routes/sites_groups.py +++ b/backend/gn_module_monitoring/routes/sites_groups.py @@ -82,9 +82,9 @@ def get_sites_group_by_id(scope, id_sites_group: int, object_type: str): schema = MonitoringSitesGroupsSchema() result = TMonitoringSitesGroups.query.get_or_404(id_sites_group) response = schema.dump(result) - response["cruved"] = get_objet_with_permission_boolean([result], object_code="MONITORINGS_GRP_SITES")[ - 0 - ]["cruved"] + response["cruved"] = get_objet_with_permission_boolean( + [result], object_code="MONITORINGS_GRP_SITES" + )[0]["cruved"] return jsonify(response)