mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 13:01:08 +00:00
fixing migration
This commit is contained in:
parent
f43d7f8c70
commit
858a93e98a
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,10 @@ def populate_sort_title(apps, schema_editor):
|
||||||
)
|
)
|
||||||
for edition in editions_wo_sort_title:
|
for edition in editions_wo_sort_title:
|
||||||
articles = chain(
|
articles = chain(
|
||||||
*(LANGUAGE_ARTICLES.get(language, ()) for language in edition.languages)
|
*(
|
||||||
|
LANGUAGE_ARTICLES.get(language, ())
|
||||||
|
for language in tuple(edition.languages)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
edition.sort_title = re.sub(
|
edition.sort_title = re.sub(
|
||||||
f'^{" |^".join(articles)} ', "", str(edition.title).lower()
|
f'^{" |^".join(articles)} ', "", str(edition.title).lower()
|
||||||
|
|
Loading…
Reference in a new issue