You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2023/04/21 22:30:14 UTC
[superset] 01/01: fix(native-filters): Fix encoding of non-temporal default values
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch john-bodley--fix-native-filter-migration
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 3a36fb763646570bf8c8bf7231273412ca8cefeb
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Sat Apr 22 10:30:05 2023 +1200
fix(native-filters): Fix encoding of non-temporal default values
---
superset/utils/dashboard_filter_scopes_converter.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/superset/utils/dashboard_filter_scopes_converter.py b/superset/utils/dashboard_filter_scopes_converter.py
index 3cc93c967a..c0ee64370d 100644
--- a/superset/utils/dashboard_filter_scopes_converter.py
+++ b/superset/utils/dashboard_filter_scopes_converter.py
@@ -268,13 +268,13 @@ def convert_filter_scopes_to_native_filters( # pylint: disable=invalid-name,too
if not default:
default = config.get("defaultValue")
- if default:
- if config["multiple"]:
- default = default.split(";")
- else:
- default = [default]
+ if default and config["multiple"]:
+ default = default.split(";")
if default:
+ if not isinstance(default, list):
+ default = [default]
+
fltr["defaultDataMask"] = {
"extraFormData": {
"filters": [