Skip to content

Commit

Permalink
fix: Soft deleted waiting lists would crash waiting list retrieval (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrokman authored Nov 19, 2024
1 parent fd98545 commit 7392f30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Models/Mship/Concerns/HasWaitingLists.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public function currentWaitingLists(): Collection
$waitingLists = collect();
foreach ($waitingListAccounts as $waitingListAccount) {
$waitingList = $waitingListAccount->waitingList;

if (empty($waitingList)) {
// Waiting list has likely been soft deleted, we don't want to retrieve it here
continue;
}

$waitingLists->put($waitingList->id, $waitingList);
}

Expand Down

0 comments on commit 7392f30

Please sign in to comment.