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
…19189)

(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 c013d11 commit b8541e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/share.py
Expand Up @@ -98,8 +98,8 @@ def set_docshare_permission(doctype, name, user, permission_to, value=1, everyon
share = add_docshare(doctype, name, user, everyone=everyone, **{permission_to: 1}, flags=flags)
else:
# no share found, nothing to remove
share = {}
pass
share = None

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

0 comments on commit b8541e9

Please sign in to comment.