Skip to content

Commit

Permalink
#1290 | Fix merge over-written change and save individual as is
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Feb 8, 2024
1 parent 8f8a6b6 commit 17715d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions packages/openchs-android/src/service/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/openchs-android/src/service/MediaQueueService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 17715d7

Please sign in to comment.