Missing `_id` key on endpoint `/api/v1/data` when asynchronous processing is enabled
kelvin-muchiri opened this issue · 0 comments
Environmental Information
- Onadata version: 3.17.3
Problem description
When asynchronous processing is enabled and the async job delays to complete or fails, _id
key is missing from Instances returned on endpoint /api/v1/data
. This confusing since the submission has been created and committed to to the database and we should therefore expect the _id
to be available
Expected behavior
An _id
key with a value of a submission's primary key should always be present in the API response.
Steps to reproduce the behavior
When setting ASYNC_POST_SUBMISSION_PROCESSING_ENABLED
is set to True
metadata for a submissions is processed asynchronously. If the job fails, Instance.json will not have the metadata included including the Instance's id which should be present as value for the _id
key
Additional Information
Logs, related issues, weird / out of place occurrences, local settings, possible approach to solving this...