mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 18:04:03 +00:00
Update tenant filtering logic for recently created models
This commit is contained in:
parent
ab64f4599d
commit
230ee7ac51
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ class UpdateSyncedResource extends QueueableListener
|
||||||
|
|
||||||
return $centralModel->tenants->filter(function ($model) use ($currentTenantMapping) {
|
return $centralModel->tenants->filter(function ($model) use ($currentTenantMapping) {
|
||||||
// Remove the mapping for the current tenant.
|
// Remove the mapping for the current tenant.
|
||||||
return ! $currentTenantMapping($model);
|
return ! $model->wasRecentlyCreated || ! $currentTenantMapping($model);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue