Skip to content

Commit

Permalink
feat: Replace n-dashes and m-dashes in boundary set slugs with hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jun 26, 2024
1 parent 8aced1a commit def6119
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.9.5 (Unreleased)

* Replace n-dashes and m-dashes in boundary set slugs with hyphens.
* Add support for Django 2.2.
* Drop support for Python 2.7 and 3.4.

Expand Down
2 changes: 1 addition & 1 deletion boundaries/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __str__(self):

def save(self, *args, **kwargs):
if not self.slug:
self.slug = slugify(self.name)
self.slug = slugify(slug_re.sub('-', self.name))
return super().save(*args, **kwargs)

def as_dict(self):
Expand Down

0 comments on commit def6119

Please sign in to comment.