From 7c53119fc54f8dfa8a3a7cf3890fb800820f9bbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Tue, 30 May 2023 15:15:36 +0200
Subject: [PATCH] fix extra form value not found

---
 src/store/modules/feature.store.js | 2 +-
 src/views/Feature/FeatureEdit.vue  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/store/modules/feature.store.js b/src/store/modules/feature.store.js
index 69b89cc3..a21eff79 100644
--- a/src/store/modules/feature.store.js
+++ b/src/store/modules/feature.store.js
@@ -437,7 +437,7 @@ const feature = {
             ...field,
             //* add value field to extra forms from feature_type and existing values if feature is defined
             value: feature.properties ?
-              feature.properties[field.label] : findCurrentValue(field.label) || null
+              feature.properties[field.name] : findCurrentValue(field.label) || null
           };
         });
         commit('SET_EXTRA_FORMS', extraForm);
diff --git a/src/views/Feature/FeatureEdit.vue b/src/views/Feature/FeatureEdit.vue
index bd7af029..962bfc3c 100644
--- a/src/views/Feature/FeatureEdit.vue
+++ b/src/views/Feature/FeatureEdit.vue
@@ -872,7 +872,7 @@ export default {
             let newXtForm = { ...extraForm };
             // if value wasn't changed in this page, get back previous value of the feature (rather than using feature orginal form, which is missing information to send in request)
             if (newXtForm.value === null) {
-              newXtForm.value = this.currentFeature.properties[newXtForm.label];
+              newXtForm.value = this.currentFeature.properties[newXtForm.name];
             }
             newXtraForms.push(newXtForm);
           }
-- 
GitLab