Skip to content

Commit

Permalink
fix(docshare): return None if share_name and value are None (#19187) (#…
Browse files Browse the repository at this point in the history
…19188)

(cherry picked from commit dbc5a79)

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
  • Loading branch information
mergify[bot] and phot0n committed Dec 8, 2022
1 parent 5d96079 commit 4e2620a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/share.py
Expand Up @@ -78,8 +78,8 @@ def set_permission(doctype, name, user, permission_to, value=1, everyone=0):
share = add(doctype, name, user, everyone=everyone, **{permission_to: 1})
else:
# no share found, nothing to remove
share = {}
pass
share = None

else:
share = frappe.get_doc("DocShare", share_name)
share.flags.ignore_permissions = True
Expand Down

0 comments on commit 4e2620a

Please sign in to comment.