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 14, 2019
1 parent fafb824 commit 927a584
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 @@ -610,8 +610,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 927a584

Please sign in to comment.