From c3fb301f9d29f8071cd0bdcc5a3ba816e57a476a Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 21 Oct 2022 15:21:20 +0200 Subject: [PATCH] Fix ClearPendingTenants bug --- src/Commands/ClearPendingTenants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/ClearPendingTenants.php b/src/Commands/ClearPendingTenants.php index 0a7782c4..d56a3713 100644 --- a/src/Commands/ClearPendingTenants.php +++ b/src/Commands/ClearPendingTenants.php @@ -62,7 +62,7 @@ class ClearPendingTenants extends Command ->query() ->onlyPending() ->when($originalExpirationDate->notEqualTo($expirationDate), function (Builder $query) use ($expirationDate) { - $query->where($query->getModel('pending_since'), '<', $expirationDate->timestamp); + $query->where($query->getModel()->getColumnForQuery('pending_since'), '<', $expirationDate->timestamp); }) ->get() ->each // Trigger the model events by deleting the tenants one by one