Fix issues related to #3111

This commit is contained in:
James Cole 2020-02-11 05:34:36 +01:00
parent 2a38c9b4ef
commit 8d806e6a1d
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
return redirect(route('currencies.index'));
break;
case 'budgets.show':
case 'budgets.edit':
$request->session()->reflash();
return redirect(route('budgets.index'));

View File

@ -60,5 +60,8 @@ class BudgetDestroyService
// also delete all relations between categories and transactions:
DB::table('budget_transaction')->where('budget_id', (int)$budget->id)->delete();
// also delete all budget limits
$budget->budgetlimits()->delete();
}
}