fix(#177): f-string ohne Backslash (Py3.9-Kompat fuer Local-Tests)

This commit is contained in:
Dotty Dotter 2026-05-06 16:21:17 +02:00
parent eb74ae647e
commit 092a68ac02

View File

@ -2276,6 +2276,9 @@ async def api_draft_pdf(draft_id: int):
news_titel = d.get("news_titel") or ""
news_url = d.get("news_url") or ""
created_at = (d.get("created_at") or "")[:16]
quelle_html = (
f' · <a href="{news_url}">Quelle</a>' if news_url else ""
)
full_html = f"""<!doctype html>
<html lang="de">
@ -2310,7 +2313,7 @@ async def api_draft_pdf(draft_id: int):
</div>
<div class="pm-meta">
Drucksache: <a href="https://gwoe.toppyr.de/antrag/{drucksache}?bundesland={bundesland}">{drucksache} ({bundesland})</a><br>
Anlass: {news_titel}{f' · <a href=\"{news_url}\">Quelle</a>' if news_url else ''}<br>
Anlass: {news_titel}{quelle_html}<br>
Erzeugt: {created_at}
</div>
<div class="pm-body">{body_html}</div>