Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submissions can't be edited #4

Open
joshuaberetta opened this issue Jun 29, 2022 · 1 comment
Open

Submissions can't be edited #4

joshuaberetta opened this issue Jun 29, 2022 · 1 comment

Comments

@joshuaberetta
Copy link
Member

Something in the assembled XML must be broken as attempts to edit mocked submissions with Enketo is met with a 400 response upon submit.

@jnm
Copy link
Member

jnm commented Sep 1, 2023

@joshuaberetta it's because the identifier inside <formhub><uuid> is the UUID of the form, not the submission, and needs to be a specific, constant value for all submissions in the form, not randomly generated:
https://github.com/joshuaberetta/mockobo/blob/bcd1b208ffaf75c60709874cc267503824dd13cd/mockobo.py#L131

Otherwise, when KPI tries to find the submission that matches both deprecatedID and the form UUID, it fails:
https://github.com/kobotoolbox/kpi/blob/78ddfe03a627b0822da6c8bfc605968cf401e426/kpi/deployment_backends/kobocat_backend.py#L567-L579

(found this while testing the OCHA domain transfer with one of @tinok's forms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants