From 5e85d4622aeddb2bbd4cc543ac2fd63df0f7cd03 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 19 Sep 2023 17:15:24 +0000 Subject: [PATCH] fix value changes --- Controller/ApiAddressAttributeController.php | 4 +++- Controller/ApiAttributeController.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Controller/ApiAddressAttributeController.php b/Controller/ApiAddressAttributeController.php index 49f4bfe..26ac8a5 100644 --- a/Controller/ApiAddressAttributeController.php +++ b/Controller/ApiAddressAttributeController.php @@ -231,7 +231,9 @@ final class ApiAddressAttributeController extends Controller $this->updateModel($request->header->account, $old, $new, AddressAttributeMapper::class, 'address_attribute', $request->getOrigin()); - if ($new->value->getValue() !== $old->value->getValue()) { + if ($new->value->getValue() !== $old->value->getValue() + && $new->type->custom + ) { $this->updateModel($request->header->account, $old->value, $new->value, AddressAttributeValueMapper::class, 'attribute_value', $request->getOrigin()); } diff --git a/Controller/ApiAttributeController.php b/Controller/ApiAttributeController.php index a888f8b..0ad6ced 100644 --- a/Controller/ApiAttributeController.php +++ b/Controller/ApiAttributeController.php @@ -231,7 +231,9 @@ final class ApiAttributeController extends Controller $this->updateModel($request->header->account, $old, $new, UnitAttributeMapper::class, 'unit_attribute', $request->getOrigin()); - if ($new->value->getValue() !== $old->value->getValue()) { + if ($new->value->getValue() !== $old->value->getValue() + && $new->type->custom + ) { $this->updateModel($request->header->account, $old->value, $new->value, UnitAttributeValueMapper::class, 'attribute_value', $request->getOrigin()); }