From 4e60e7a9d9f21d3baad4fcb2c7433807e5704aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 9 Oct 2024 17:29:23 +0100 Subject: [PATCH] Fixed customer empty email get contacts list.. --- app/Models/Common/Contact.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 9d5c4174a..982b250f2 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -162,7 +162,9 @@ class Contact extends Model { $contacts = collect(); - $contacts->push($this); + if (! empty($this->email)) { + $contacts->push($this); + } $contact_persons = $this->contact_persons()->whereNotNull('email')->get();