From 5b40d9e7cd2cb63e52e6a3c8ff4f36c553fd8db9 Mon Sep 17 00:00:00 2001 From: Anupam Date: Sat, 18 Dec 2021 20:12:57 +0530 Subject: [PATCH] fix: linter issues --- erpnext/crm/doctype/opportunity/test_opportunity.py | 4 ++-- erpnext/crm/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.py b/erpnext/crm/doctype/opportunity/test_opportunity.py index 1bc58cd049..e768da2313 100644 --- a/erpnext/crm/doctype/opportunity/test_opportunity.py +++ b/erpnext/crm/doctype/opportunity/test_opportunity.py @@ -7,8 +7,8 @@ import frappe from frappe.utils import now_datetime, random_string, today from erpnext.crm.doctype.lead.lead import make_customer -from erpnext.crm.doctype.opportunity.opportunity import make_quotation from erpnext.crm.doctype.lead.test_lead import make_lead +from erpnext.crm.doctype.opportunity.opportunity import make_quotation from erpnext.crm.utils import get_linked_communication_list test_records = frappe.get_test_records('Opportunity') @@ -66,7 +66,7 @@ class TestOpportunity(unittest.TestCase): lead_doc.add_comment('Comment', text='Test Comment 2') create_communication(lead_doc.doctype, lead_doc.name, lead_doc.email_id) create_communication(lead_doc.doctype, lead_doc.name, lead_doc.email_id) - + opp_doc = make_opportunity(opportunity_from="Lead", lead=lead_doc.name) opportunity_comment_count = frappe.db.count("Comment", {"reference_doctype": opp_doc.doctype, "reference_name": opp_doc.name}) opportunity_communication_count = len(get_linked_communication_list(opp_doc.doctype, opp_doc.name)) diff --git a/erpnext/crm/utils.py b/erpnext/crm/utils.py index 741df9def6..a4576a287e 100644 --- a/erpnext/crm/utils.py +++ b/erpnext/crm/utils.py @@ -46,5 +46,5 @@ def get_linked_communication_list(doctype, docname): "link_name": docname, "parent": ("not in", communications) }, pluck="parent") - + return communications + communication_links