fix edition title display issues

This commit is contained in:
Your Name 2024-07-15 23:26:24 -04:00 committed by Henri Dickson
parent be72c1d082
commit fce6759195
4 changed files with 17 additions and 17 deletions

View file

@ -198,7 +198,7 @@ class Edition(Item):
imprint = jsondata.CharField(_("imprint"), null=True, blank=True, max_length=500)
def get_localized_subtitle(self) -> str | None:
return self.localized_title[0]["text"] if self.localized_subtitle else None
return self.localized_subtitle[0]["text"] if self.localized_subtitle else None
@property
def display_subtitle(self) -> str | None:

View file

@ -40,7 +40,9 @@ class GoogleBooks(AbstractSite):
pub_house = (
b["volumeInfo"]["publisher"] if "publisher" in b["volumeInfo"] else None
)
language = b["volumeInfo"]["language"] if "language" in b["volumeInfo"] else []
language = (
b["volumeInfo"]["language"].lower() if "language" in b["volumeInfo"] else []
)
pages = b["volumeInfo"]["pageCount"] if "pageCount" in b["volumeInfo"] else None
if "mainCategory" in b["volumeInfo"]:

View file

@ -198,8 +198,7 @@
</div>
<div id="item-title-more" class="middle">
<hgroup>
<p>
{% if item.display_subtitle %}{{ item.display_subtitle }}{% endif %}
{% if item.display_subtitle %}<p>{{ item.display_subtitle }}</p>{% endif %}
{% if item.orig_title and item.orig_title != item.display_title %}
<p>
{{ item.orig_title }}
@ -211,7 +210,6 @@
{% if item.parent_item %}
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.display_title }}</a>
{% endif %}
</p>
{% if item.author or item.translator %}
<p>
<i>

View file

@ -188,7 +188,7 @@ services:
neodb-worker:
<<: *neodb-service
command: neodb-manage rqworker-pool --num-workers ${NEODB_RQ_WORKER_NUM:-4} --with-scheduler import export mastodon fetch crawl ap cron
command: neodb-manage rqworker --with-scheduler import export mastodon fetch crawl ap cron
depends_on:
migration:
condition: service_completed_successfully