Mercurial > gemma
changeset 3492:73285a90cab2 zpg-ldc
soundingresult_import: added ZPG only if not available
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 27 May 2019 17:17:47 +0200 |
parents | 76d63f18f55f |
children | 97326e30407c |
files | client/src/components/importconfiguration/types/Soundingresults.vue |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/types/Soundingresults.vue Mon May 27 17:04:03 2019 +0200 +++ b/client/src/components/importconfiguration/types/Soundingresults.vue Mon May 27 17:17:47 2019 +0200 @@ -366,12 +366,12 @@ }, depthReferenceOptions() { if (this.bottleneck) { - return [ - ...Object.keys( - JSON.parse(this.bottleneck.properties.reference_water_levels) - ), - "ZPG" - ]; + const referenceLevels = JSON.parse( + this.bottleneck.properties.reference_water_levels + ); + const result = Object.keys(referenceLevels); + if (!referenceLevels["ZPG"]) result.push("ZPG"); // ZPG should always be available + return result; } return []; }