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 <[email protected]>
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: