You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/09/16 17:21:35 UTC

(superset) branch master updated: fix: import bug template params (#35144)

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

maximebeauchemin 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 c193d6d6a1 fix: import bug template params (#35144)
c193d6d6a1 is described below

commit c193d6d6a1fe7220ca940a66b36333c308407ffd
Author: SBIN2010 <13...@users.noreply.github.com>
AuthorDate: Tue Sep 16 20:21:29 2025 +0300

    fix: import bug template params (#35144)
---
 superset/datasets/schemas.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/superset/datasets/schemas.py b/superset/datasets/schemas.py
index a0d5747dd7..431881d194 100644
--- a/superset/datasets/schemas.py
+++ b/superset/datasets/schemas.py
@@ -293,6 +293,7 @@ class ImportV1DatasetSchema(Schema):
     def fix_extra(self, data: dict[str, Any], **kwargs: Any) -> dict[str, Any]:
         """
         Fix for extra initially being exported as a string.
+        And fixed bug when exporting template_params as empty string.
         """
         if isinstance(data.get("extra"), str):
             try:
@@ -301,6 +302,9 @@ class ImportV1DatasetSchema(Schema):
             except ValueError:
                 data["extra"] = None
 
+        if "template_params" in data and data["template_params"] == "":
+            data["template_params"] = None
+
         return data
 
     table_name = fields.String(required=True)