fix: use .get to avoid key error (#7184)

This commit is contained in:
Suraj Shetty 2019-04-04 12:01:35 +05:30 committed by Faris Ansari
parent 8911ecba47
commit fc29318c0b

View file

@ -28,7 +28,7 @@ def print_has_permission_check_logs(func):
# print only if access denied
# and if user is checking his own permission
if not result and self_perm_check:
msgprint(('<br>').join(frappe.flags['has_permission_check_logs']))
msgprint(('<br>').join(frappe.flags.get('has_permission_check_logs')))
frappe.flags.pop('has_permission_check_logs', None)
return result
return inner