diff --git a/packages/openchs-android/src/service/IndividualService.js b/packages/openchs-android/src/service/IndividualService.js index 6fb09217d..147f97db7 100644 --- a/packages/openchs-android/src/service/IndividualService.js +++ b/packages/openchs-android/src/service/IndividualService.js @@ -109,10 +109,7 @@ class IndividualService extends BaseService { const db = this.db; this.db.write(() => { ObservationsHolder.convertObsForSave(individual.observations); - db.create(Individual.schema.name, { - uuid: individual.uuid, - observations: individual.observations - }, true); + db.create(Individual.schema.name, individual, true); 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);