From 5180405d36bf1946eb80d70c36b0db0d64b5ce4a Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 31 Jan 2024 15:49:17 +0530 Subject: [PATCH] fix: perm hooks should always send true/false None is now assumed as False by framework --- insights/overrides.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insights/overrides.py b/insights/overrides.py index 442a5117c..b54cf1551 100644 --- a/insights/overrides.py +++ b/insights/overrides.py @@ -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