Skip to content

Commit ac97f21

Browse files
committed
Make sure hourly tracking is backwards compatible
1 parent 3af6650 commit ac97f21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jobs/RecordMetric.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function handle(): void
4949
'year' => $metric->year(),
5050
'month' => $metric->month(),
5151
'day' => $metric->day(),
52-
'hour' => $metric->hour(),
52+
...(is_null($metric->hour()) ? [] : ['hour' => $metric->hour()]),
5353
'measurable_type' => $metric->measurable()?->getMorphClass(),
5454
'measurable_id' => $metric->measurable()?->getKey(),
5555
], ['value' => 0]);

0 commit comments

Comments
 (0)