changes in logic address-edit

This commit is contained in:
Daniel Herrero 2018-02-07 13:26:21 +01:00
parent 68f9bfd375
commit d251227107
1 changed files with 3 additions and 2 deletions

View File

@ -80,12 +80,13 @@ export default class Controller {
let observation = this.observations[i];
let isNewObservation = observation.id === undefined;
if (types.indexOf(observation.observationTypeFk) !== -1) {
if (observation.observationTypeFk && types.indexOf(observation.observationTypeFk) !== -1) {
repeatedTypes = true;
break;
}
types.push(observation.observationTypeFk);
if (observation.observationTypeFk)
types.push(observation.observationTypeFk);
if (isNewObservation && observation.observationTypeFk && observation.description) {
observationsObj.create.push(observation);