Skip to content

Commit

Permalink
[WIP] fix user specified JSON metadata not updating dashboard on refr…
Browse files Browse the repository at this point in the history
…esh (#7027)

(cherry picked from commit cc58f0e)
  • Loading branch information
thunter009 authored and xtinec committed Mar 15, 2019
1 parent d7b2c3e commit 9855837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9855837

Please sign in to comment.