From 130634fde65a6aabed022a12478b3a66a37eed35 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Wed, 10 Apr 2019 10:28:48 +0200 Subject: [PATCH] Fix image creation : categories was not saved #511 --- src/components/images-uploader/ImageUploader.vue | 6 +++--- src/components/images-uploader/ImagesUploader.vue | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/images-uploader/ImageUploader.vue b/src/components/images-uploader/ImageUploader.vue index 3a73fbf909..6a34072101 100644 --- a/src/components/images-uploader/ImageUploader.vue +++ b/src/components/images-uploader/ImageUploader.vue @@ -28,7 +28,7 @@ @@ -232,7 +232,7 @@ }, toggleCategory(category) { - const newValue = this.document.image_categories.slice(0); + const newValue = this.document.categories.slice(0); if (!newValue.includes(category)) { newValue.push(category); @@ -240,7 +240,7 @@ newValue.splice(newValue.indexOf(category), 1); } - this.document.image_categories = newValue; + this.document.categories = newValue; } } }; diff --git a/src/components/images-uploader/ImagesUploader.vue b/src/components/images-uploader/ImagesUploader.vue index 853c9e6217..ca2e4b1439 100644 --- a/src/components/images-uploader/ImagesUploader.vue +++ b/src/components/images-uploader/ImagesUploader.vue @@ -203,7 +203,6 @@ image.document.geometry.geom = this.parentDocument.geometry ? this.parentDocument.geometry.geom : null; image.document.file_size = file.size; image.document.image_type = this.imageType; - image.document.image_categories = []; image.document.associations[associationsArrayName] = [ { document_id: this.parentDocument.document_id } ];