From bec88bc52a0eb410353b68c10c946c58360dabf2 Mon Sep 17 00:00:00 2001 From: Pranav Nachanekar Date: Thu, 3 Oct 2019 16:58:38 +0530 Subject: [PATCH] fix: exists return tuple not string --- erpnext/crm/doctype/appointment/test_appointment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/doctype/appointment/test_appointment.py b/erpnext/crm/doctype/appointment/test_appointment.py index d7731bec87d..16a370eb7be 100644 --- a/erpnext/crm/doctype/appointment/test_appointment.py +++ b/erpnext/crm/doctype/appointment/test_appointment.py @@ -10,7 +10,7 @@ import datetime def create_test_lead(): test_lead = frappe.db.exists({'doctype':'Lead','lead_name':'Test Lead'}) if test_lead: - return frappe.get_doc('Lead',test_lead) + return frappe.get_doc('Lead',test_lead[0][0]) test_lead = frappe.get_doc({ 'doctype':'Lead', 'lead_name':'Test Lead', @@ -22,7 +22,7 @@ def create_test_lead(): def create_test_appointments(): test_appointment = frappe.db.exists({ 'doctype':'Appointment', 'email':'test@example.com' }) if test_appointment: - return frappe.get_doc('Appointment',test_appointment) + return frappe.get_doc('Appointment',test_appointment[0][0]) test_appointment = frappe.get_doc({ 'doctype':'Appointment', 'email':'test@example.com',