fix(assign): do not assign if administrator

This commit is contained in:
Rushabh Mehta 2019-04-15 16:58:45 +05:30
parent 44b0cb6383
commit 6aaac1e9db

View File

@ -341,7 +341,7 @@ def assign_to_user(doc, subject_field):
elif doc.lead:
assign_user = frappe.db.get_value('Lead', doc.lead, 'lead_owner')
if assign_user:
if assign_user and assign_user != 'Administrator':
if not assign_to.get(dict(doctype = doc.doctype, name = doc.name)):
assign_to.add({
"assign_to": assign_user,