forked from mirrors/bookwyrm
lowercase shelf identifier
This commit is contained in:
parent
408ca6609c
commit
0e13616e73
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ class Shelf(OrderedCollectionMixin, BookWyrmModel):
|
|||
''' set the identifier '''
|
||||
saved = super().save(*args, **kwargs)
|
||||
if not self.identifier:
|
||||
slug = re.sub(r'[^\w]', '', self.name)
|
||||
slug = re.sub(r'[^\w]', '', self.name).lower()
|
||||
self.identifier = '%s-%d' % (slug, self.id)
|
||||
return super().save(*args, **kwargs)
|
||||
return saved
|
||||
|
|
Loading…
Reference in a new issue