fix: pinned view should become unpinned when made public

This commit is contained in:
Shariq Ansari 2024-08-16 12:30:41 +05:30
parent a340b9c422
commit 72b125348e

View File

@ -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()