unicef / iogt

BSD 2-Clause "Simplified" License
25 stars 34 forks source link

After 2.9.0 upgrade, API returns server errors for some queries #1688

Closed cbunicef closed 4 months ago

cbunicef commented 4 months ago

For example

https://ss.goodinternet.org/api/v1/questionnaires/293/submissions/

returns internal server error.

Within Admin Panel the data is still listed and can still be downloaded: https://ss.goodinternet.org/admin/forms/submissions/293/

istride commented 4 months ago

The issue was caused by the upgrade to Wagtail 3.0.3. There have been significant changes in the treatment of database fields containing JSON data. Form data for user submissions are stored as JSON and so are affected by these changes. There are automated tests for user submissions, but they assumed the old way of dealing with JSON fields and were giving a false positive result. The tests and the application code have been updated to reflect the new situation.