fix(docshare): return None if share_name and value are None (#19187)
This commit is contained in:
parent
0b2bc14816
commit
dbc5a790c1
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue