You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2023/04/24 22:13:36 UTC

[superset] 01/01: rm tag conditions

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch fix-tags-dashboard
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 362a9ab8e66d00b57fe753cea7d9be0ddf54cd4e
Author: hughhhh <hu...@gmail.com>
AuthorDate: Mon Apr 24 18:13:00 2023 -0400

    rm tag conditions
---
 superset/dashboards/api.py | 40 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 26 deletions(-)

diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py
index e2744e38b6..1fae10580d 100644
--- a/superset/dashboards/api.py
+++ b/superset/dashboards/api.py
@@ -191,9 +191,10 @@ class DashboardRestApi(BaseSupersetModelRestApi):
         "roles.id",
         "roles.name",
         "is_managed_externally",
+        "tags.id",
+        "tags.name",
+        "tags.type",
     ]
-    if is_feature_enabled("TAGGING_SYSTEM"):
-        list_columns += ["tags.id", "tags.name", "tags.type"]
     list_select_columns = list_columns + ["changed_on", "created_on", "changed_by_fk"]
     order_columns = [
         "changed_by.first_name",
@@ -219,36 +220,23 @@ class DashboardRestApi(BaseSupersetModelRestApi):
     edit_columns = add_columns
 
     search_columns = (
-        (
-            "created_by",
-            "changed_by",
-            "dashboard_title",
-            "id",
-            "owners",
-            "published",
-            "roles",
-            "slug",
-            "tags",
-        )
-        if is_feature_enabled("TAGGING_SYSTEM")
-        else (
-            "created_by",
-            "changed_by",
-            "dashboard_title",
-            "id",
-            "owners",
-            "published",
-            "roles",
-            "slug",
-        )
+        "created_by",
+        "changed_by",
+        "dashboard_title",
+        "id",
+        "owners",
+        "published",
+        "roles",
+        "slug",
+        "tags",
     )
+
     search_filters = {
         "dashboard_title": [DashboardTitleOrSlugFilter],
         "id": [DashboardFavoriteFilter, DashboardCertifiedFilter],
         "created_by": [DashboardCreatedByMeFilter, DashboardHasCreatedByFilter],
+        "tags": [DashboardTagFilter],
     }
-    if is_feature_enabled("TAGGING_SYSTEM"):
-        search_filters["tags"] = [DashboardTagFilter]
 
     base_order = ("changed_on", "desc")