fix: website_list_for_contact, fix changed frappe.db.exist keyword argument (#21958)

This commit is contained in:
Andrew McLeod 2020-05-27 09:06:35 +01:00 committed by GitHub
parent ed2c1803df
commit 0fa1cc647f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ def has_website_permission(doc, ptype, user, verbose=False):
return frappe.db.exists(doctype, get_customer_filter(doc, customers))
elif suppliers:
fieldname = 'suppliers' if doctype == 'Request for Quotation' else 'supplier'
return frappe.db.exists(doctype, filters={
return frappe.db.exists(doctype, {
'name': doc.name,
fieldname: ["in", suppliers]
})