Merge pull request #313 from shariquerik/pinned-public-view
fix: pinned view should become unpinned when made public
This commit is contained in:
commit
abf3ea729b
@ -92,6 +92,8 @@ def public(name, value):
|
||||
frappe.throw("Not permitted", frappe.PermissionError)
|
||||
|
||||
doc = frappe.get_doc("CRM View Settings", name)
|
||||
if doc.pinned:
|
||||
doc.pinned = False
|
||||
doc.public = value
|
||||
doc.user = "" if value else frappe.session.user
|
||||
doc.save()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user