1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 19:44:03 +00:00

Update tenant filtering logic for recently created models

This commit is contained in:
Leandro Gehlen 2026-04-22 07:51:33 -03:00 committed by GitHub
parent ab64f4599d
commit 230ee7ac51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}); });
} }