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 23:48:27 UTC

[superset] branch master updated: fix(native-filters): Fix encoding of non-temporal default values (#23779)

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

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 4b3e507e8b fix(native-filters): Fix encoding of non-temporal default values (#23779)
4b3e507e8b is described below

commit 4b3e507e8b22b2d25e9a79c1feb03fceaefbd464
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Sat Apr 22 11:48:20 2023 +1200

    fix(native-filters): Fix encoding of non-temporal default values (#23779)
---
 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": [