The Register Participant form in CommCare can be submitted without any new participants listed. When we receive a message where 'form.question1` is undefined (i.e not in the message), nothing should be upserted. The job should exit and return the statement "Nothing to upsert. No participants were registered".
Describe the bug
The
Register Participant
form in CommCare can be submitted without any new participants listed. When we receive a message where 'form.question1` is undefined (i.e not in the message), nothing should be upserted. The job should exit and return the statement "Nothing to upsert. No participants were registered".To Reproduce
expression.js
Link to the job itself in Github: https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/2.d.upsertRegisterParticipant.js
state.json
https://www.openfn.org/projects/pd3yk4/messages/mv7qbkbe
Expected behavior
Even though nothing will be upserted, the job should pass for this state.
To test/resolve