Search: don't leak data for projects with this feature disabled
@@ -1057,6 +1057,8 @@ class SearchAnalyticsBase(ProjectAdminMixin, PrivateViewMixin, TemplateView):
now = timezone.now().date()
last_3_month = now - timezone.timedelta(days=90)
+ data = []
+ if self._is_enabled(project):
data = (
SearchQuery.objects.filter(
project=project,
