mirror of
https://github.com/skoelle/icloud-contacts-sync.git
synced 2026-09-17 23:40:24 +00:00
unknown year dashboard fix
This commit is contained in:
+2
-1
@@ -24,7 +24,7 @@ from api.auth import get_current_user, resolve_account_for_user
|
||||
from api.schemas import ContactListResponse, ContactOut, SyncRunOut
|
||||
from config import Config
|
||||
from mailer import build_message, fetch_birthdays_for_date, send_message
|
||||
from utils import fmt_birthday_age, fmt_birthday_short
|
||||
from utils import fmt_birthday_age, fmt_birthday_short, is_unknown_year
|
||||
|
||||
logging.basicConfig(level=Config.LOG_LEVEL, format="%(asctime)s [%(levelname)s] %(message)s")
|
||||
logger = logging.getLogger("api")
|
||||
@@ -36,6 +36,7 @@ templates = Jinja2Templates(directory="api/templates")
|
||||
templates.env.filters["urlquote"] = lambda s: quote_plus(s or "")
|
||||
templates.env.filters["fmt_birthday"] = fmt_birthday_short
|
||||
templates.env.filters["fmt_age"] = fmt_birthday_age
|
||||
templates.env.filters["has_year"] = lambda b: not is_unknown_year(b)
|
||||
|
||||
|
||||
def _fmt_ts(dt) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user