From 8c980f1769bd1b8a0c0bce8cd1d046b887f92a06 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Thu, 9 Nov 2023 10:05:51 +0530 Subject: [PATCH] fix: fetch onlt HD Customer contacts --- helpdesk/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/helpdesk/utils.py b/helpdesk/utils.py index c7dbd9593..458b18752 100644 --- a/helpdesk/utils.py +++ b/helpdesk/utils.py @@ -86,6 +86,7 @@ def get_customer(contact: str) -> tuple[str]: .select(QBDynamicLink.link_name) .where(QBDynamicLink.parentfield == "links") .where(QBDynamicLink.parenttype == "Contact") + .where(QBDynamicLink.link_doctype == "HD Customer") .join(QBContact) .on(QBDynamicLink.parent == QBContact.name) .where(Criterion.any(conditions))