diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index b9adc6d69d..3040b537a9 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -120,7 +120,6 @@ $device_firmware_version = $_POST["device_firmware_version"]; $device_enabled = $_POST["device_enabled"]; $device_template = $_POST["device_template"]; - $device_profile_uuid = $_POST["device_profile_uuid"]; $device_description = $_POST["device_description"]; //lines $device_lines = $_POST["device_lines"]; @@ -273,8 +272,8 @@ if (permission_exists('device_template')) { $array['devices'][0]['device_template'] = $device_template; } - if (permission_exists('device_profile_edit') && is_uuid($device_profile_uuid)) { - $array['devices'][0]['device_profile_uuid'] = $device_profile_uuid; + if (permission_exists('device_profile_edit')) { + $array['devices'][0]['device_profile_uuid'] = is_uuid($device_profile_uuid) ? $device_profile_uuid : null; } if (permission_exists('device_description')) { $array['devices'][0]['device_description'] = $device_description; @@ -1174,16 +1173,11 @@ echo " \n"; echo " \n"; - if (is_array($device_lines) && @sizeof($device_lines) > 1 && permission_exists('device_line_delete')) { - if (is_uuid($row['device_line_uuid'])) { - echo "