From ccf338ee474b7c7a8b73733bfc912ceb8f71257d Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Thu, 9 Jun 2022 13:31:12 +0200 Subject: [PATCH] Bugfix: Storing obs from My places now works --- src/components/Observation.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Observation.vue b/src/components/Observation.vue index 5bc6d3e..faeeb35 100644 --- a/src/components/Observation.vue +++ b/src/components/Observation.vue @@ -578,8 +578,8 @@ isRecordAvailable = lstObservations.find(({observationId}) => observationId === this.observation.observationId); } - this.observationForStore.cropOrganismId = this.crop.cropId; - this.observationForStore.organismId = this.pest.pestId; + this.observationForStore.cropOrganismId = this.observation.cropOrganismId; + this.observationForStore.organismId = this.observation.organismId; this.observationForStore.timeOfObservation = this.strDateObservation; this.observationForStore.statusChangedTime = this.strDateObservation; if (this.observation.statusTypeId) { @@ -608,7 +608,6 @@ // Reference to this is lost in here for (var i = 0; i < lstObservations.length; i++) - //$.each(lstObservations, function(index, jobservation) { var jobservation = lstObservations[i]; if (jobservation.observationId === selectedObservationId) { -- GitLab