Fix various issues with new features, nullpointers and missing checks.

This commit is contained in:
James Cole
2024-12-31 08:05:25 +01:00
parent e4aa218b5f
commit 9e34314dbc
9 changed files with 55 additions and 51 deletions

View File

@@ -133,8 +133,8 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
Log::debug(sprintf('Now in %s(%s, %s)', __METHOD__, $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
$return = [];
$availableBudgets = $this->user->availableBudgets()
->where('start_date', $start->format('Y-m-d H:i:s'))
->where('end_date', $end->format('Y-m-d H:i:s'))->get()
->where('start_date', $start->format('Y-m-d'))
->where('end_date', $end->format('Y-m-d'))->get()
;
Log::debug(sprintf('Found %d available budgets', $availableBudgets->count()));