fix(permission): use .get to avoid key error (#7187)
Port of https://github.com/frappe/frappe/pull/7184
This commit is contained in:
parent
f853313a5a
commit
1c8fd3169e
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue