Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 3, 2024
1 parent f4de555 commit f59eb8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/backend/app/central/central_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,13 @@ async def convert_odk_submission_json_to_geojson(
props_to_append = {}

# Add username & task id
props_to_append.update({
"username": submission.get("username", ""),
"task_id": submission.get("phonenumber", ""),
})

props_to_append.update(
{
"username": submission.get("username", ""),
"task_id": submission.get("phonenumber", ""),
}
)

# Extract feature location verification keys (including image name)
verification_data = submission.get("verification", {})
props_to_append.update(verification_data)
Expand Down
3 changes: 1 addition & 2 deletions src/backend/app/helpers/helper_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def convert_odk_submission_json_to_geojson_wrapper(
current_user: AuthUser = Depends(login_required),
):
"""Convert the ODK submission output JSON to GeoJSON.
The submission JSON be downloaded via ODK Central, or osm-fieldwork.
The logic works with the standardised XForm form fields from osm-fieldwork.
"""
Expand All @@ -149,4 +149,3 @@ async def convert_odk_submission_json_to_geojson_wrapper(

headers = {"Content-Disposition": f"attachment; filename={filename.stem}.geojson"}
return Response(submission_geojson.getvalue(), headers=headers)

0 comments on commit f59eb8d

Please sign in to comment.