From 8b231f725667323058fa352fbbffb68d0920868d Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Pvt Ltd Date: Tue, 18 Oct 2016 17:30:24 +0530 Subject: [PATCH] Pythonic corrections --- erpnext/utilities/address_and_contact.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/utilities/address_and_contact.py b/erpnext/utilities/address_and_contact.py index 324f6791c5..36879d216d 100644 --- a/erpnext/utilities/address_and_contact.py +++ b/erpnext/utilities/address_and_contact.py @@ -29,7 +29,6 @@ def has_permission(doc, ptype, user): for df in (links.get("permitted_links") + links.get("not_permitted_links")): doctype = df.options name = doc.get(df.fieldname) - names.append(name) if name and frappe.has_permission(doctype, ptype, doc=name): @@ -37,9 +36,7 @@ def has_permission(doc, ptype, user): if not any(names): return True - - else: - return False + return False def get_permission_query_conditions_for_contact(user): return get_permission_query_conditions("Contact")