Skip to content

Commit

Permalink
fix(backend): handle cases when select_one_from_file is either geojso…
Browse files Browse the repository at this point in the history
…n or csv
  • Loading branch information
spwoodcock committed Apr 16, 2024
1 parent 4b13928 commit 29f93d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/app/central/central_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ async def update_survey_xform(
xform_instance_src = root.findall(".//xforms:instance[@src]", namespaces)
for inst in xform_instance_src:
src_value = inst.get("src", "")
if src_value.endswith(".csv"):
if src_value.endswith(".geojson") or src_value.endswith(".csv"):
inst.set("src", f"jr://file/{category}.csv")

# <instance> must be defined inside <model></model> key
Expand Down

0 comments on commit 29f93d3

Please sign in to comment.