From 33a5475d91526418d64ea15208ae7e765f8c6100 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 15 Dec 2022 21:02:59 +0100 Subject: [PATCH] Fixed saving all null values in ContractconfigValue --- application/ContractconfigValue/ContractconfigValue.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/ContractconfigValue/ContractconfigValue.php b/application/ContractconfigValue/ContractconfigValue.php index b6615a63d..4e6c94e76 100644 --- a/application/ContractconfigValue/ContractconfigValue.php +++ b/application/ContractconfigValue/ContractconfigValue.php @@ -6,6 +6,10 @@ class ContractconfigValue extends mfBaseModel { public function set($new_value) { $item = $this->getProperty("item"); + $me = new User(); + $me->loadMe(); + $this->edit_by = $me->id; + if($new_value === null || strlen($new_value) == 0) { $this->int = null; $this->number = null; @@ -25,10 +29,6 @@ class ContractconfigValue extends mfBaseModel { return false; } - $me = new User(); - $me->loadMe(); - $this->edit_by = $me->id; - return true; }