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

Save xml to json data in pre-save #2486

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Oct 11, 2023

Changes / Features implemented

When asynchronous processing of submissions is enabled, submissions whose json is not yet processed have an empty json on endpoint /api/v1/data/<form_id>. To prevent this from happening, we save the XML to json data during pre-save. The json will later be updated to include the metadata in the post_save signal

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Get rid of records with empty json on endpoint `/api/v1/data/<form_id> when processing submissions asynchronously

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #

@kelvin-muchiri kelvin-muchiri changed the title save xml to json data in pre-save Save xml to json data in pre-save Oct 11, 2023
when asynchronous processing of submissions is enabled, submissions whose json is not yet processed have an empty json on endpoint /api/v1/data/<form_id>. To prevent this from happening, we save the XML to json data during pre-save. The json will later be updated to include the metadata in the post_save signal
@kelvin-muchiri kelvin-muchiri enabled auto-merge (squash) October 11, 2023 12:47
@kelvin-muchiri kelvin-muchiri merged commit 68913ab into main Oct 11, 2023
8 checks passed
@kelvin-muchiri kelvin-muchiri deleted the bug-submission-empty-dict branch October 11, 2023 23:16
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

Successfully merging this pull request may close these issues.

2 participants