mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:14:04 +00:00
fix regression in previous commit: consume PendingDispatch *before* reverting context
This commit is contained in:
parent
b9cc63feed
commit
ffad2db103
1 changed files with 4 additions and 4 deletions
|
|
@ -83,6 +83,10 @@ class Tenancy
|
|||
$this->initialize($tenant);
|
||||
$result = $callback($tenant);
|
||||
} finally {
|
||||
if ($result instanceof PendingDispatch) { // #1277
|
||||
$result = null;
|
||||
}
|
||||
|
||||
if ($originalTenant) {
|
||||
$this->initialize($originalTenant);
|
||||
} else {
|
||||
|
|
@ -90,10 +94,6 @@ class Tenancy
|
|||
}
|
||||
}
|
||||
|
||||
if ($result instanceof PendingDispatch) { // #1277
|
||||
$result = null;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue