Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Oct 10, 2023
1 parent 2309867 commit 462d408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions backend/gn_module_monitoring/routes/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions backend/gn_module_monitoring/routes/sites_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 462d408

Please sign in to comment.