1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 12:04:03 +00:00

create central model only with syncedAttributes

This commit is contained in:
Ovidiu Popescu 2023-02-09 11:31:36 +02:00
parent 7d59ff180f
commit 7a8baad3ca
No known key found for this signature in database
GPG key ID: D939DC6D2AD0AB09

View file

@ -60,7 +60,7 @@ class UpdateSyncedResource extends QueueableListener
} else { } else {
// If the resource doesn't exist at all in the central DB,we create // If the resource doesn't exist at all in the central DB,we create
// the record with all attributes, not just the synced ones. // the record with all attributes, not just the synced ones.
$centralModel = $event->model->getCentralModelName()::create($event->model->getAttributes()); $centralModel = $event->model->getCentralModelName()::create($syncedAttributes);
event(new SyncedResourceChangedInForeignDatabase($event->model, null)); event(new SyncedResourceChangedInForeignDatabase($event->model, null));
} }
}); });