superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch master updated: [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027)
Date Thu, 14 Mar 2019 18:20:38 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new cc58f0e  [WIP] fix user specified JSON metadata not updating dashboard on refresh
(#7027)
cc58f0e is described below

commit cc58f0e661044e95c7c86d0da8d77a0a6640efe7
Author: Tom Hunter <thunter009@users.noreply.github.com>
AuthorDate: Thu Mar 14 14:20:22 2019 -0400

    [WIP] fix user specified JSON metadata not updating dashboard on refresh (#7027)
---
 superset/views/core.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 08d52f8..197dbe7 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -633,8 +633,9 @@ class DashboardModelView(SupersetModelView, DeleteMixin):  # noqa
     }
 
     def pre_add(self, obj):
-        obj.slug = obj.slug.strip() or None
+        obj.slug = obj.slug or None
         if obj.slug:
+            obj.slug = obj.slug.strip()
             obj.slug = obj.slug.replace(' ', '-')
             obj.slug = re.sub(r'[^\w\-]+', '', obj.slug)
         if g.user not in obj.owners:


Mime
View raw message