From c1b60fda880db305d60a8ee2377ae4cf012dfcd8 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 19 Sep 2023 17:16:01 +0000 Subject: [PATCH] fix value change log --- Controller/ApiDriverAttributeController.php | 4 +++- Controller/ApiVehicleAttributeController.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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()); }