Skip to content

Commit

Permalink
Merge pull request frappe#217 from ankush/fix_perm_hook
Browse files Browse the repository at this point in the history
fix: perm hooks should always send true/false
  • Loading branch information
ankush authored Jan 31, 2024
2 parents b79350a + 5180405 commit 1d5ceb3
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 1d5ceb3

Please sign in to comment.