File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ class BaseDeploymentBackend(abc.ABC):
39
39
]
40
40
41
41
# XPaths are relative to the root node
42
- SUBMISSION_UUID_XPATH = './meta/deprecatedID'
42
+ SUBMISSION_CURRENT_UUID_XPATH = './meta/instanceID'
43
+ SUBMISSION_DEPRECATED_UUID_XPATH = './meta/deprecatedID'
43
44
FORM_UUID_XPATH = './formhub/uuid'
44
45
45
46
def __init__ (self , asset ):
Original file line number Diff line number Diff line change @@ -539,7 +539,9 @@ def edit_submission(
539
539
t ('Your submission XML is malformed.' )
540
540
)
541
541
try :
542
- deprecated_uuid = xml_root .find (self .SUBMISSION_UUID_XPATH ).text
542
+ deprecated_uuid = xml_root .find (
543
+ self .SUBMISSION_DEPRECATED_UUID_XPATH
544
+ ).text
543
545
xform_uuid = xml_root .find (self .FORM_UUID_XPATH ).text
544
546
except AttributeError :
545
547
raise SubmissionIntegrityError (
Original file line number Diff line number Diff line change 11
11
from django .core .files import File
12
12
from rest_framework import status
13
13
14
- from kpi .deployment_backends .base_backend import BaseDeploymentBackend
15
14
from kpi .mixins .audio_transcoding import AudioTranscodingMixin
16
15
from kpi .models .asset_snapshot import AssetSnapshot
17
16
from kpi .tests .utils .xml import get_form_and_submission_tag_names
@@ -70,10 +69,10 @@ def enketo_edit_instance_response_with_uuid_validation(request):
70
69
submission = body ['instance' ]
71
70
submission_xml_root = lxml .etree .fromstring (submission )
72
71
assert submission_xml_root .find (
73
- BaseDeploymentBackend . FORM_UUID_XPATH
72
+ './formhub/uuid'
74
73
).text .strip ()
75
74
assert submission_xml_root .find (
76
- BaseDeploymentBackend . SUBMISSION_UUID_XPATH
75
+ './meta/instanceID'
77
76
).text .strip ()
78
77
79
78
resp_body = {
Original file line number Diff line number Diff line change @@ -694,14 +694,16 @@ def _get_enketo_link(
694
694
)
695
695
if (
696
696
not (
697
- e := submission_xml_root .find (deployment .SUBMISSION_UUID_XPATH )
697
+ e := submission_xml_root .find (
698
+ deployment .SUBMISSION_CURRENT_UUID_XPATH
699
+ )
698
700
)
699
701
or not e .text .strip ()
700
702
):
701
703
edit_submission_xml (
702
704
submission_xml_root ,
703
- deployment .SUBMISSION_UUID_XPATH ,
704
- 'uuid:' + submission_json ['_uuid' ]
705
+ deployment .SUBMISSION_CURRENT_UUID_XPATH ,
706
+ 'uuid:' + submission_json ['_uuid' ],
705
707
)
706
708
707
709
# Do not use version_uid from the submission until UI gives users the
You can’t perform that action at this time.
0 commit comments