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)
  • Loading branch information
thunter009 authored and xtinec committed Mar 14, 2019
1 parent 05be866 commit cc58f0e
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 cc58f0e

Please sign in to comment.