diff --git a/src/components/Observation.vue b/src/components/Observation.vue index 5bc6d3e52e814ab3d43cec895cb85eb541255203..faeeb35eb8ec88f43e03c377bdd8be03d711e790 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) {