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