fix notification from migration

This commit is contained in:
Jérémy Munsch 2021-04-21 13:38:28 +02:00
parent f5c2ed0e18
commit 0c4f2b1d05

View file

@ -21,7 +21,7 @@ class SendNotificationMail
public function handle(NotifySubscriptions $event)
{
foreach ($event->ticket->subscriptions as $sub) {
if ($sub->email !== Auth::user()->email) {
if (Auth::user() and $sub->email !== Auth::user()->email) {
Mail::to($sub->email)->send(new TicketUpdate($event->ticket, $event->corpsMaj));
}
}