mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
fix: always allow tags to be returned via the API (#24060)
This commit is contained in:
@@ -143,9 +143,10 @@ class ChartRestApi(BaseSupersetModelRestApi):
|
||||
"viz_type",
|
||||
"query_context",
|
||||
"is_managed_externally",
|
||||
"tags.id",
|
||||
"tags.name",
|
||||
"tags.type",
|
||||
]
|
||||
if is_feature_enabled("TAGGING_SYSTEM"):
|
||||
show_columns += ["tags.id", "tags.name", "tags.type"]
|
||||
|
||||
show_select_columns = show_columns + ["table.id"]
|
||||
list_columns = [
|
||||
@@ -192,9 +193,10 @@ class ChartRestApi(BaseSupersetModelRestApi):
|
||||
"thumbnail_url",
|
||||
"url",
|
||||
"viz_type",
|
||||
"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_by_fk", "changed_on"]
|
||||
order_columns = [
|
||||
"changed_by.first_name",
|
||||
@@ -222,9 +224,8 @@ class ChartRestApi(BaseSupersetModelRestApi):
|
||||
"dashboards",
|
||||
"slice_name",
|
||||
"viz_type",
|
||||
"tags",
|
||||
]
|
||||
if is_feature_enabled("TAGGING_SYSTEM"):
|
||||
search_columns += ["tags"]
|
||||
base_order = ("changed_on", "desc")
|
||||
base_filters = [["id", ChartFilter, lambda: []]]
|
||||
search_filters = {
|
||||
@@ -235,10 +236,8 @@ class ChartRestApi(BaseSupersetModelRestApi):
|
||||
],
|
||||
"slice_name": [ChartAllTextFilter],
|
||||
"created_by": [ChartHasCreatedByFilter, ChartCreatedByMeFilter],
|
||||
"tags": [ChartTagFilter],
|
||||
}
|
||||
if is_feature_enabled("TAGGING_SYSTEM"):
|
||||
search_filters["tags"] = [ChartTagFilter]
|
||||
|
||||
# Will just affect _info endpoint
|
||||
edit_columns = ["slice_name"]
|
||||
add_columns = edit_columns
|
||||
|
||||
Reference in New Issue
Block a user