Fix not saving Manufacturer and Model. Have to unset the text input if the ddm is populated

This commit is contained in:
Isaac Connor
2023-07-12 14:30:49 -04:00
parent 37c39386ee
commit e13a42aa46

View File

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