Skip to content

Commit

Permalink
fix(validate): fix validate all empty surveys
Browse files Browse the repository at this point in the history
  • Loading branch information
lailabjil committed Apr 11, 2024
1 parent 2c46c9a commit 2fa2162
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edt",
"version": "3.14.11",
"version": "3.14.12",
"dateVersion": "11/04/2024",
"licence": "MIT",
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/service/survey-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1787,14 +1787,15 @@ const validateAllEmptySurveys = (idHousehold: string) => {
}

const value = getValue(idSurvey, FieldNameEnum.FIRSTNAME) as string;

if (value == null || value.length == 0) {
data.stateData = stateData;
promisesToWait.push(saveData(idSurvey, data));
promisesToWait.push(saveData(idSurvey, data, false, true));
}
});

return new Promise(resolve => {
Promise.all(promisesToWait).then(() => {
Promise.all(promisesToWait).then(saves => {

Check warning on line 1798 in src/service/survey-service.ts

View workflow job for this annotation

GitHub Actions / test_lint

'saves' is defined but never used

Check warning on line 1798 in src/service/survey-service.ts

View workflow job for this annotation

GitHub Actions / test_lint

'saves' is defined but never used
resolve(true);
});
});
Expand Down

0 comments on commit 2fa2162

Please sign in to comment.