Skip to content

Commit

Permalink
fix: raise_exception=False for has_permission in filter_allowed_users (
Browse files Browse the repository at this point in the history
…#20113) (#20122)

* raise_exception=False for has_permission for workflow users

* style: format

[skip ci]

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 6cba675)

Co-authored-by: Leonard Goertz <49870752+uepselon@users.noreply.github.com>
  • Loading branch information
mergify[bot] and uepselon committed Feb 22, 2023
1 parent 1a38314 commit 23137f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frappe/workflow/doctype/workflow_action/workflow_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ def filter_allowed_users(users, doc, transition):

filtered_users = []
for user in users:
if has_approval_access(user, doc, transition) and has_permission(doctype=doc, user=user):
if has_approval_access(user, doc, transition) and has_permission(
doctype=doc, user=user, raise_exception=False
):
filtered_users.append(user)
return filtered_users

Expand Down

0 comments on commit 23137f2

Please sign in to comment.