diff --git a/LibreNMS/Component.php b/LibreNMS/Component.php index 7975e83276..629dd49688 100644 --- a/LibreNMS/Component.php +++ b/LibreNMS/Component.php @@ -219,10 +219,11 @@ class Component ->with('prefs') ->get() ->each(function (\App\Models\Component $component) use ($updated) { - unset($updated[$component->id]['type']); // can't change type + $update = $updated[$component->id]; + unset($update['type']); // can't change type // update component attributes - $component->fill($updated[$component->id]); + $component->fill($update); if ($component->isDirty()) { // Log the update to the Eventlog. $message = "Component $component->id has been modified: ";