diff --git a/bookwyrm/templatetags/status_display.py b/bookwyrm/templatetags/status_display.py index 96525ca22..430fba198 100644 --- a/bookwyrm/templatetags/status_display.py +++ b/bookwyrm/templatetags/status_display.py @@ -1,4 +1,5 @@ """ template filters """ +import datetime from typing import Any, Optional from dateutil.relativedelta import relativedelta from django import template @@ -55,7 +56,7 @@ def get_boosted(boost: models.Boost) -> Any: @register.filter(name="published_date") -def get_published_date(date: str) -> Any: +def get_published_date(date: datetime.datetime) -> str | None: """less verbose combo of humanize filters""" if not date: return "" diff --git a/bookwyrm/templatetags/utilities.py b/bookwyrm/templatetags/utilities.py index 0aabb94f7..f1f7c4bdd 100644 --- a/bookwyrm/templatetags/utilities.py +++ b/bookwyrm/templatetags/utilities.py @@ -93,7 +93,7 @@ def get_book_cover_thumbnail( @register.filter(name="get_isni_bio") -def get_isni_bio(existing: int, author: Author) -> str: +def get_isni_bio(existing: list[str], author: Author) -> str: """Returns the isni bio string if an existing author has an isni listed""" auth_isni = re.sub(r"\D", "", str(author.isni)) if len(existing) == 0: