mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 01:16:46 -06:00
Fix #7514
This commit is contained in:
parent
18ba2e563e
commit
15f683ef7e
@ -182,6 +182,11 @@ class BudgetLimitHandler
|
||||
$end = app('navigation')->startOfPeriod($budgetLimit->end_date, $viewRange);
|
||||
$end = app('navigation')->endOfPeriod($end, $viewRange);
|
||||
$budget = Budget::withTrashed()->find($budgetLimit->budget_id);
|
||||
if(null === $budget) {
|
||||
Log::warning('Budget is null, cannot continue.');
|
||||
$budgetLimit->forceDelete();
|
||||
return;
|
||||
}
|
||||
$user = $budget->user;
|
||||
|
||||
// sanity check. It happens when the budget has been deleted so the original user is unknown.
|
||||
|
Loading…
Reference in New Issue
Block a user