diff --git a/Controller/ApiDriverAttributeController.php b/Controller/ApiDriverAttributeController.php index 959bd56..0831e78 100644 --- a/Controller/ApiDriverAttributeController.php +++ b/Controller/ApiDriverAttributeController.php @@ -231,7 +231,9 @@ final class ApiDriverAttributeController extends Controller $this->updateModel($request->header->account, $old, $new, DriverAttributeMapper::class, 'driver_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, DriverAttributeValueMapper::class, 'attribute_value', $request->getOrigin()); } diff --git a/Controller/ApiVehicleAttributeController.php b/Controller/ApiVehicleAttributeController.php index d8871c7..1046c5b 100644 --- a/Controller/ApiVehicleAttributeController.php +++ b/Controller/ApiVehicleAttributeController.php @@ -231,7 +231,9 @@ final class ApiVehicleAttributeController extends Controller $this->updateModel($request->header->account, $old, $new, VehicleAttributeMapper::class, 'vehicle_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, VehicleAttributeValueMapper::class, 'attribute_value', $request->getOrigin()); }