fix value change log

This commit is contained in:
Dennis Eichhorn 2023-09-19 17:16:01 +00:00
parent 48b371ee9e
commit c1b60fda88
2 changed files with 6 additions and 2 deletions

View File

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

View File

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