You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by gr...@apache.org on 2017/11/29 22:55:18 UTC
[incubator-superset] branch master updated: Allow underscores in
slugs (#3951)
This is an automated email from the ASF dual-hosted git repository.
graceguo 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 34d6618 Allow underscores in slugs (#3951)
34d6618 is described below
commit 34d6618b2e854fc4d81912be2a5ef10cda26e163
Author: michellethomas <mi...@gmail.com>
AuthorDate: Wed Nov 29 14:55:13 2017 -0800
Allow underscores in slugs (#3951)
* Allow underscores in slugs
* Switching regex to use shorter \w
---
superset/views/core.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/views/core.py b/superset/views/core.py
index a12721d..ef0cbf5 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -575,7 +575,7 @@ class DashboardModelView(SupersetModelView, DeleteMixin): # noqa
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'[^\w\-]+', '', obj.slug)
if g.user not in obj.owners:
obj.owners.append(g.user)
utils.validate_json(obj.json_metadata)
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].