[minor] [fix] cart
This commit is contained in:
parent
c8b2a9d654
commit
7c96dc1783
@ -307,6 +307,8 @@ def get_party(user=None):
|
|||||||
return frappe.get_doc(party_doctype, party)
|
return frappe.get_doc(party_doctype, party)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
if not cart_settings.enabled:
|
||||||
|
return None
|
||||||
customer = frappe.new_doc("Customer")
|
customer = frappe.new_doc("Customer")
|
||||||
fullname = get_fullname(user)
|
fullname = get_fullname(user)
|
||||||
customer.update({
|
customer.update({
|
||||||
@ -368,6 +370,9 @@ def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_
|
|||||||
if not party:
|
if not party:
|
||||||
party = get_party()
|
party = get_party()
|
||||||
|
|
||||||
|
if not party:
|
||||||
|
return []
|
||||||
|
|
||||||
address_docs = frappe.db.sql("""select * from `tabAddress`
|
address_docs = frappe.db.sql("""select * from `tabAddress`
|
||||||
where `{0}`=%s order by name limit {1}, {2}""".format(party.doctype.lower(),
|
where `{0}`=%s order by name limit {1}, {2}""".format(party.doctype.lower(),
|
||||||
limit_start, limit_page_length), party.name,
|
limit_start, limit_page_length), party.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user