From 73068e0343e590dc119f7129e29854a6c0654548 Mon Sep 17 00:00:00 2001 From: "s.samko" Date: Wed, 29 May 2024 14:50:18 +0100 Subject: [PATCH] Fix #10425 - Value of "currency_id" in custom table changes from NULL to an empty string when saving --- modules/DynamicFields/DynamicField.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/DynamicFields/DynamicField.php b/modules/DynamicFields/DynamicField.php index b62b7add51e..052b693ffbb 100755 --- a/modules/DynamicFields/DynamicField.php +++ b/modules/DynamicFields/DynamicField.php @@ -5,7 +5,7 @@ * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. * * SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd. - * Copyright (C) 2011 - 2018 SalesAgility Ltd. + * Copyright (C) 2011 - 2024 SalesAgility Ltd. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the @@ -450,6 +450,10 @@ public function save($isUpdate) continue; } + if ($field['type'] === 'currency_id' && empty($this->bean->$name)) { + continue; + } + if (!empty($this->bean->bean_fields_to_save) && !in_array($name, $this->bean->bean_fields_to_save, true)){ continue; }