Fix
parent
4b467fa7b0
commit
a33d981dcc
|
|
@ -76,7 +76,7 @@ class DeviceLogDailyReportCommand extends Command
|
|||
protected function createReportToLinkosMeteorologicalDevice(Device $device): void
|
||||
{
|
||||
$lastReportedAt = MeteorologicalDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
|
||||
?: MeteorologicalReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at');
|
||||
?: MeteorologicalReport::where('device_id', $device->id)->oldest('reported_at')->value('reported_at');
|
||||
|
||||
if ($lastReportedAt === null) {
|
||||
return;
|
||||
|
|
@ -104,7 +104,7 @@ class DeviceLogDailyReportCommand extends Command
|
|||
protected function createReportToLinkosWaterQualityDevice(Device $device): void
|
||||
{
|
||||
$lastReportedAt = WaterQualityDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
|
||||
?: WaterQualityReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at');
|
||||
?: WaterQualityReport::where('device_id', $device->id)->oldest('reported_at')->value('reported_at');
|
||||
|
||||
if ($lastReportedAt === null) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue