Skip to content

Commit

Permalink
fix . in slug (#114)
Browse files Browse the repository at this point in the history
* fix . in slug

causes django-rest-api to error

* formatting
  • Loading branch information
jason20c authored Jul 28, 2023
1 parent d9390f0 commit d883fc2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/django_ixctl/models/ixctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ def create_from_pdb(cls, instance, pdb_object, save=True, **fields):

@classmethod
def default_slug(cls, name):
return name.replace("/", "_").replace(" ", "_").replace("-", "_").lower()
return (
name.replace("/", "_")
.replace(" ", "_")
.replace(".", "_")
.replace("-", "_")
.lower()
)

@classmethod
def get_default_exchange_for_org(cls, org):
Expand Down

0 comments on commit d883fc2

Please sign in to comment.