From 6d08cf27576d9662e554524c62c2ad85c2fc0e09 Mon Sep 17 00:00:00 2001 From: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:35:27 +0530 Subject: [PATCH] fix: rendered the analytics for labels (#5906) * fix: rendered the analytics for labels * fix: analytics exports --- apiserver/plane/app/views/analytic/base.py | 4 ++-- apiserver/plane/bgtasks/analytic_plot_export.py | 3 ++- apiserver/plane/settings/common.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apiserver/plane/app/views/analytic/base.py b/apiserver/plane/app/views/analytic/base.py index 9f1f1a48d..49728cde8 100644 --- a/apiserver/plane/app/views/analytic/base.py +++ b/apiserver/plane/app/views/analytic/base.py @@ -112,8 +112,8 @@ class AnalyticsEndpoint(BaseAPIView): Issue.objects.filter( workspace__slug=slug, **filters, - labels__id__isnull=False - & Q(label_issue__deleted_at__isnull=True), + labels__id__isnull=False, + label_issue__deleted_at__isnull=True, ) .distinct("labels__id") .order_by("labels__id") diff --git a/apiserver/plane/bgtasks/analytic_plot_export.py b/apiserver/plane/bgtasks/analytic_plot_export.py index 4f5994941..7e8630e65 100644 --- a/apiserver/plane/bgtasks/analytic_plot_export.py +++ b/apiserver/plane/bgtasks/analytic_plot_export.py @@ -132,7 +132,8 @@ def get_label_details(slug, filters): Issue.objects.filter( workspace__slug=slug, **filters, - labels__id__isnull=False & Q(label_issue__deleted_at__isnull=True), + labels__id__isnull=False, + label_issue__deleted_at__isnull=True, ) .distinct("labels__id") .order_by("labels__id") diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index 6e9c98ce1..083a8df05 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -439,5 +439,6 @@ ATTACHMENT_MIME_TYPES = [ "text/javascript", "application/json", "text/xml", + "text/csv", "application/xml", ]