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:13 UTC

[superset] branch john-bodley--fix-native-filter-migration created (now 3a36fb7636)

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

johnbodley pushed a change to branch john-bodley--fix-native-filter-migration
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 3a36fb7636 fix(native-filters): Fix encoding of non-temporal default values

This branch includes the following new commits:

     new 3a36fb7636 fix(native-filters): Fix encoding of non-temporal default values

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: fix(native-filters): Fix encoding of non-temporal default values

Posted by jo...@apache.org.
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": [