Skip to content

Commit

Permalink
Allow underscores in slugs
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Nov 29, 2017
1 parent 17635e1 commit 46654f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def pre_add(self, obj):
obj.slug = obj.slug.strip() or None
if obj.slug:
obj.slug = obj.slug.replace(' ', '-')
obj.slug = re.sub(r'[^a-zA-Z0-9\-]+', '', obj.slug)
obj.slug = re.sub(r'[^a-zA-Z0-9\-_]+', '', obj.slug)
if g.user not in obj.owners:
obj.owners.append(g.user)
utils.validate_json(obj.json_metadata)
Expand Down

0 comments on commit 46654f6

Please sign in to comment.