From 67b522c7ec50af0910bf5d37cbb24a8c9403cb8a Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Thu, 9 May 2024 12:39:48 +0200 Subject: [PATCH] log ordine non trovato --- code/app/Jobs/NotifyRemindOrder.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/app/Jobs/NotifyRemindOrder.php b/code/app/Jobs/NotifyRemindOrder.php index 458543ec..9140fa2b 100644 --- a/code/app/Jobs/NotifyRemindOrder.php +++ b/code/app/Jobs/NotifyRemindOrder.php @@ -31,6 +31,11 @@ public function handle() foreach($this->orders_id as $order_id) { $order = Order::find($order_id); + if (is_null($order)) { + \Log::error('Ordine non trovato per notifica reminder: ' . $order_id . ', ' . $gas->id); + continue; + } + $users = $order->notifiableUsers($gas); foreach($users as $user) {