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

Fix "There was an error loading Enketo" when attempting to edit submissions #4979

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

jnm
Copy link
Member

@jnm jnm commented Jun 18, 2024

Checklist

  1. If you've added code that should be tested, add tests
  2. If you've changed APIs, update (or create!) the documentation
  3. Ensure the tests pass
  4. Make sure that your code lints and that you've followed our coding style
  5. Write a title and, if necessary, a description of your work suitable for publishing in our release notes
  6. Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. Open an issue in the docs if there are UI/UX changes

Description

Properly handle surveys that were created with select_one_from_file or select_multiple_from_file questions prior to release 2.024.09.

Notes

Remove brittle and now unnecessary flattening of file columns in select_one_from_file and select_multiple_from_file rows. This was causing a KeyError when the asset content predated #4403 and kobotoolbox/formpack#314.

Flattening of {"type": "select_one_from_file", "file": "choices.csv"} (and equivalent select_multiple_from_file structures) to the XLSForm-standard {"type": "select_one_from_file choices.csv"} is handled by kobotoolbox/formpack#318 and kobotoolbox/formpack#319.

Related issues

Fixes a problem in #4403 and kobotoolbox/formpack#314
Related to kobotoolbox/formpack#318 and kobotoolbox/formpack#319

`file` columns in `select_one_from_file` and `select_multiple_from_file`
rows. This was causing a `KeyError` when the asset content predated #4403
and kobotoolbox/formpack#314.

Flattening of `{"type": "select_one_from_file", "file": "choices.csv"}`
(and equivalent `select_multiple_from_file` structures) to the
XLSForm-standard `{"type": "select_one_from_file choices.csv"}` is
handled by kobotoolbox/formpack#318 and kobotoolbox/formpack#319.
@jnm jnm added the high priority To be done soon label Jun 18, 2024
@jnm jnm merged commit 2ee8da8 into release/2.024.17 Jun 18, 2024
5 checks passed
@jnm jnm deleted the fix-enketo-editing-error branch June 18, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority To be done soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant