diff --git a/packages/openchs-android/package-lock.json b/packages/openchs-android/package-lock.json index 4980bf23c..01078fd43 100644 --- a/packages/openchs-android/package-lock.json +++ b/packages/openchs-android/package-lock.json @@ -34,7 +34,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.31.33", + "openchs-models": "1.31.34", "prop-types": "15.8.1", "react": "18.2.0", "react-native": "0.72.3", @@ -16439,9 +16439,9 @@ } }, "node_modules/openchs-models": { - "version": "1.31.33", - "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.31.33.tgz", - "integrity": "sha512-5lBx6strH9Y3c3SXeG4FremioAED5eWYsyQ5SNeB+2z5xnsC07yuIMYKdUZv/VGpjN+lnNImmAJ6IF/Zkagnyw==", + "version": "1.31.34", + "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.31.34.tgz", + "integrity": "sha512-tkoCZk5k25lM4L6bZQrFTEgcT67Xt++Z5jhpMUyTF3lJJNUQBfYXe+zh1DVB7mKNQmgaEeGpj+f+gw2AKRyBQg==", "dependencies": { "uuid": "^9.0.1" }, @@ -35170,9 +35170,9 @@ } }, "openchs-models": { - "version": "1.31.33", - "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.31.33.tgz", - "integrity": "sha512-5lBx6strH9Y3c3SXeG4FremioAED5eWYsyQ5SNeB+2z5xnsC07yuIMYKdUZv/VGpjN+lnNImmAJ6IF/Zkagnyw==", + "version": "1.31.34", + "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.31.34.tgz", + "integrity": "sha512-tkoCZk5k25lM4L6bZQrFTEgcT67Xt++Z5jhpMUyTF3lJJNUQBfYXe+zh1DVB7mKNQmgaEeGpj+f+gw2AKRyBQg==", "requires": { "uuid": "^9.0.1" } diff --git a/packages/openchs-android/package.json b/packages/openchs-android/package.json index 5d0a310dc..c1a6cf6e8 100644 --- a/packages/openchs-android/package.json +++ b/packages/openchs-android/package.json @@ -58,7 +58,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.31.33", + "openchs-models": "1.31.34", "prop-types": "15.8.1", "react": "18.2.0", "react-native": "0.72.3", diff --git a/packages/openchs-android/src/service/IndividualService.js b/packages/openchs-android/src/service/IndividualService.js index 6fb09217d..9407cf329 100644 --- a/packages/openchs-android/src/service/IndividualService.js +++ b/packages/openchs-android/src/service/IndividualService.js @@ -112,7 +112,7 @@ class IndividualService extends BaseService { db.create(Individual.schema.name, { uuid: individual.uuid, observations: individual.observations - }, true); + }, Realm.UpdateMode.Modified); db.create(EntityQueue.schema.name, EntityQueue.create(individual, Individual.schema.name)); }); } diff --git a/packages/openchs-android/src/service/MediaQueueService.js b/packages/openchs-android/src/service/MediaQueueService.js index 743aa0d7a..ea3b7c05c 100644 --- a/packages/openchs-android/src/service/MediaQueueService.js +++ b/packages/openchs-android/src/service/MediaQueueService.js @@ -201,6 +201,7 @@ class MediaQueueService extends BaseService { }) .then(() => this.uploadToUrl(uploadUrl, mediaQueueItem)) .then(() => this.replaceObservation(mediaQueueItem, uploadUrl)) + .then(() => this.popItem(mediaQueueItem)) .catch((error) => { General.logError("MediaQueueService", `Error while uploading ${mediaQueueItem.uuid} - ${mediaQueueItem.fileName}`); General.logError("MediaQueueService", error); diff --git a/packages/openchs-android/src/service/ProgramEnrolmentService.js b/packages/openchs-android/src/service/ProgramEnrolmentService.js index c50dec0bb..a9af59c26 100644 --- a/packages/openchs-android/src/service/ProgramEnrolmentService.js +++ b/packages/openchs-android/src/service/ProgramEnrolmentService.js @@ -67,7 +67,7 @@ class ProgramEnrolmentService extends BaseService { db.create(ProgramEnrolment.schema.name, { uuid: programEnrolment.uuid, observations: programEnrolment.observations - }, true); + }, Realm.UpdateMode.Modified); db.create(EntityQueue.schema.name, EntityQueue.create(programEnrolment, ProgramEnrolment.schema.name)); }); }