mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 19:11:09 +00:00
fixing test and other checks
This commit is contained in:
parent
575e1bac4c
commit
f43d7f8c70
2 changed files with 5 additions and 2 deletions
|
@ -369,7 +369,10 @@ class Edition(Book):
|
|||
if self.sort_title in [None, ""]:
|
||||
if self.sort_title in [None, ""]:
|
||||
articles = chain(
|
||||
*(LANGUAGE_ARTICLES.get(language, ()) for language in self.languages)
|
||||
*(
|
||||
LANGUAGE_ARTICLES.get(language, ())
|
||||
for language in tuple(self.languages)
|
||||
)
|
||||
)
|
||||
self.sort_title = re.sub(
|
||||
f'^{" |^".join(articles)} ', "", str(self.title).lower()
|
||||
|
|
|
@ -142,4 +142,4 @@ class Book(TestCase):
|
|||
for langauge, articles in settings.LANGUAGE_ARTICLES.items()
|
||||
for article in articles
|
||||
)
|
||||
self.assertTrue(all(book.sort_title == "Test Edition" for book in books))
|
||||
self.assertTrue(all(book.sort_title == "test edition" for book in books))
|
||||
|
|
Loading…
Reference in a new issue