Skip to content

Commit f3061bf

Browse files
authored
Convert Wireless to a modern module (librenms#17086)
* Convert Wireless to a modern module Phase one Phase two will update interfaces and add yaml * Apply fixes from StyleCI --------- Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
1 parent a19e7f1 commit f3061bf

28 files changed

+530
-945
lines changed

LibreNMS/DB/SyncsModels.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ protected function syncModels($parentModel, $relationship, $models, $existing =
5151
// update
5252
foreach ($existing_rows as $index => $existing_row) {
5353
if ($index == 0) {
54-
$existing_row->fill($models->get($exist_key)->getAttributes())->save();
54+
// fill attributes, ignoring mutators and fillable
55+
$merged = array_merge($existing_row->getAttributes(), $models->get($exist_key)->getAttributes());
56+
$existing_row->setRawAttributes($merged);
57+
$existing_row->save();
5558
} else {
5659
// delete extra rows at this key
5760
$existing_row->delete();

0 commit comments

Comments
 (0)