Skip to content

Commit

Permalink
fix: perm hooks should always send true/false
Browse files Browse the repository at this point in the history
None is now assumed as False by framework
  • Loading branch information
ankush committed Jan 31, 2024
1 parent b79350a commit 5180405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions insights/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def has_permission(doc, ptype, user):
"Insights Query",
"Insights Dashboard",
]:
return
return True

# only check if doc exists
if not doc.name:
return
return True

if not frappe.db.get_single_value("Insights Settings", "enable_permissions"):
return True
Expand Down

0 comments on commit 5180405

Please sign in to comment.