fix: pass self.flags.ignore_permissions to the ignore_permissions

argument of Address and Contact controller
This commit is contained in:
Tunde Akinyanmi 2020-10-08 02:04:53 +01:00
parent d4c80abb6d
commit 4010196488

View File

@ -132,7 +132,7 @@ class Customer(TransactionBase):
address = frappe.get_doc('Address', address_name.get('name'))
if not address.has_link('Customer', self.name):
address.append('links', dict(link_doctype='Customer', link_name=self.name))
address.save()
address.save(ignore_permissions=self.flags.ignore_permissions)
lead = frappe.db.get_value("Lead", self.lead_name, ["organization_lead", "lead_name", "email_id", "phone", "mobile_no", "gender", "salutation"], as_dict=True)
@ -150,7 +150,7 @@ class Customer(TransactionBase):
contact = frappe.get_doc('Contact', contact_name.get('name'))
if not contact.has_link('Customer', self.name):
contact.append('links', dict(link_doctype='Customer', link_name=self.name))
contact.save()
contact.save(ignore_permissions=self.flags.ignore_permissions)
else:
lead.lead_name = lead.lead_name.lstrip().split(" ")