[fix] tests
This commit is contained in:
parent
45c6b550f0
commit
b04409746e
@ -197,8 +197,7 @@ class TestShoppingCart(unittest.TestCase):
|
|||||||
|
|
||||||
def remove_all_items_from_cart(self):
|
def remove_all_items_from_cart(self):
|
||||||
quotation = _get_cart_quotation()
|
quotation = _get_cart_quotation()
|
||||||
quotation.set("items", [])
|
quotation.delete()
|
||||||
quotation.save(ignore_permissions=True)
|
|
||||||
|
|
||||||
def create_user_if_not_exists(self, email, first_name = None):
|
def create_user_if_not_exists(self, email, first_name = None):
|
||||||
if frappe.db.exists("User", email):
|
if frappe.db.exists("User", email):
|
||||||
|
@ -98,7 +98,7 @@ def update_contact(doc, method):
|
|||||||
contact_name = frappe.db.get_value("Contact", {"email_id": doc.name})
|
contact_name = frappe.db.get_value("Contact", {"email_id": doc.name})
|
||||||
if contact_name:
|
if contact_name:
|
||||||
contact = frappe.get_doc("Contact", contact_name)
|
contact = frappe.get_doc("Contact", contact_name)
|
||||||
contact.first_name = doc.first_name
|
for key in ("first_name", "last_name", "phone"):
|
||||||
contact.last_name = doc.last_name
|
if doc.get(key):
|
||||||
contact.phone = doc.phone
|
contact.set(key, doc.get(key))
|
||||||
contact.save(ignore_permissions=True)
|
contact.save(ignore_permissions=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user