fix value changes

This commit is contained in:
Dennis Eichhorn 2023-09-19 17:15:24 +00:00
parent ba07fd51a1
commit 5e85d4622a
2 changed files with 6 additions and 2 deletions

View File

@ -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());
}

View File

@ -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());
}