mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 19:47:11 +00:00
This commit is contained in:
@@ -77,7 +77,11 @@ class BudgetLimitHandler
|
|||||||
$end = app('navigation')->endOfPeriod($end, $viewRange);
|
$end = app('navigation')->endOfPeriod($end, $viewRange);
|
||||||
$budget = Budget::find($budgetLimit->budget_id);
|
$budget = Budget::find($budgetLimit->budget_id);
|
||||||
if (null === $budget) {
|
if (null === $budget) {
|
||||||
Log::warning('Budget is null, cannot continue.');
|
Log::warning('Budget is null, probably deleted, find deleted version.');
|
||||||
|
$budget = Budget::withTrashed()->find($budgetLimit->budget_id);
|
||||||
|
}
|
||||||
|
if (null === $budget) {
|
||||||
|
Log::warning('Budget is still null, cannot continue, will delete budget limit.');
|
||||||
$budgetLimit->forceDelete();
|
$budgetLimit->forceDelete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user