From 31451f754ec4d96c9a619cd4228ff4f6b4906ed4 Mon Sep 17 00:00:00 2001
From: Robert Latta <robert.latta@geant.org>
Date: Wed, 22 Jun 2022 09:43:30 +0000
Subject: [PATCH] excluded contacts without mail value. RE. DBOARD3-596

---
 inventory_provider/db/ims_data.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inventory_provider/db/ims_data.py b/inventory_provider/db/ims_data.py
index 19ec47d1..308ba5a8 100644
--- a/inventory_provider/db/ims_data.py
+++ b/inventory_provider/db/ims_data.py
@@ -111,13 +111,13 @@ def get_customer_service_emails(ds: IMS):
     customer_contacts = defaultdict(set)
     for x in ds.get_filtered_entities(
         'customerrelatedcontact',
-        "contact.plannedworkmail != ''",
+        "contact.plannedworkmail != '' | contact.mail != ''",
         CUSTOMER_RELATED_CONTACT_PROPERTIES['Contact']
     ):
         customer_contacts[x['customerid']].add(x['contact']['mail'])
     for x in ds.get_filtered_entities(
         'customerrelatedcontact',
-        "contact.troubleticketMail != ''",
+        "contact.troubleticketMail != '' | contact.mail != ''",
         CUSTOMER_RELATED_CONTACT_PROPERTIES['Contact']
     ):
         customer_contacts[x['customerid']].add(x['contact']['mail'])
-- 
GitLab