Fix nulls.

This commit is contained in:
James Cole
2025-08-16 06:02:26 +02:00
parent fb19739b54
commit 8d52f83b4f
2 changed files with 6 additions and 3 deletions

View File

@@ -74,8 +74,8 @@ class BudgetLimitEnrichment implements EnrichmentInterface
private function collectIds(): void
{
$this->start = $this->collection->min('start_date');
$this->end = $this->collection->max('end_date');
$this->start = $this->collection->min('start_date') ?? Carbon::now()->startOfMonth();
$this->end = $this->collection->max('end_date') ?? Carbon::now()->endOfMonth();
/** @var BudgetLimit $limit */
foreach ($this->collection as $limit) {