From e13a42aa467e9e50007db46032029d6039ab2db4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 12 Jul 2023 14:30:49 -0400 Subject: [PATCH] Fix not saving Manufacturer and Model. Have to unset the text input if the ddm is populated --- web/includes/actions/monitor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/includes/actions/monitor.php b/web/includes/actions/monitor.php index e904c20aa..79c568a30 100644 --- a/web/includes/actions/monitor.php +++ b/web/includes/actions/monitor.php @@ -126,6 +126,10 @@ if ($action == 'save') { ZM\Debug('Auto selecting server to '.ZM_SERVER_ID); } } + if (!empty($newMonitor['ManufacturerId']) and empty($newMonitor['Manufacturer'])) + unset($newMonitor['Manufacturer']); + if (!empty($newMonitor['ModelId']) and empty($newMonitor['Model'])) + unset($newMonitor['Model']); $changes = $monitor->changes($newMonitor); ZM\Debug('Changes: '. print_r($changes, true));