Skip to content

Commit

Permalink
fix: ensure status Entity field is updated alongside survey form `s…
Browse files Browse the repository at this point in the history
…tatus` field (#1586)

* build: update osm-fieldwork --> 0.12.0 for xlsform groups fix

* fix(backend): xpath location to update form_category in xform

* build: update osm-fieldwork --> v0.12.1
  • Loading branch information
spwoodcock authored Jun 19, 2024
1 parent f02640c commit 7341f39
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/backend/app/central/central_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from defusedxml import ElementTree
from fastapi import HTTPException
from loguru import logger as log
from osm_fieldwork.CSVDump import CSVDump
from osm_fieldwork.csvdump import CSVDump
from osm_fieldwork.OdkCentral import OdkAppUser, OdkForm, OdkProject
from pyxform.builder import create_survey_element_from_dict
from pyxform.xls2json import parse_file_to_json
Expand Down Expand Up @@ -354,7 +354,7 @@ async def update_project_xform(
xform_obj.createForm(
odk_id,
updated_xform_data,
xform_id,
form_name=xform_id,
)
# The draft form must be published after upload
xform_obj.publishForm(odk_id, xform_id)
Expand Down Expand Up @@ -544,7 +544,7 @@ async def modify_xform_xml(

# Hardcode the form_category value for the start instructions
form_category_update = root.find(
".//xforms:bind[@nodeset='/data/all/form_category']", namespaces
".//xforms:bind[@nodeset='/data/essential/form_category']", namespaces
)
if form_category_update is not None:
if category.endswith("s"):
Expand Down
8 changes: 4 additions & 4 deletions src/backend/pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
"cryptography>=42.0.1",
"defusedxml>=0.7.1",
"osm-login-python==1.0.3",
"osm-fieldwork==0.11.2",
"osm-fieldwork==0.12.1",
"osm-rawdata==0.3.0",
"fmtm-splitter==1.2.2",
]
Expand Down

0 comments on commit 7341f39

Please sign in to comment.