Compare commits

...
Author SHA1 Message Date
Andrew BeveridgeandClaude Opus 4.6 517dac00c8 fix: f-string backslash syntax error breaking backend deploy
The referral banner HTML in email_service.py used backslash-escaped
quotes inside an f-string expression, which is a SyntaxError in
Python 3.11 (Cloud Run runtime). Extract the HTML to a variable
before the f-string.

This has been blocking all backend deploys since PR #680.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 19:53:20 -04:00
2 changed files with 13 additions and 2 deletions

No files matched your search

+12 -1
View File
@@ -285,6 +285,17 @@ class EmailService:
}
"""
referral_banner = (
'<div style="background: linear-gradient(135deg, #7c3aed10, #a855f710); '
'border: 1px solid #a855f730; border-radius: 8px; padding: 16px; margin: 16px 0; '
'text-align: center;">'
'<p style="color: #a855f7; font-weight: 600; margin: 0;">&#127873; '
'Your referral discount is waiting!</p>'
'<p style="color: #666; font-size: 14px; margin: 4px 0 0;">'
'Sign in to claim your discount on credit purchases</p></div>'
if referral_code else ""
)
content = f"""
<p>{t(locale, "emails.magicLink.greeting")}</p>
@@ -294,7 +305,7 @@ class EmailService:
<a href="{magic_link_url}" class="button">{t(locale, "emails.magicLink.signInButton")}</a>
</p>
{"<div style='background: linear-gradient(135deg, #7c3aed10, #a855f710); border: 1px solid #a855f730; border-radius: 8px; padding: 16px; margin: 16px 0; text-align: center;'><p style=\"color: #a855f7; font-weight: 600; margin: 0;\">&#127873; Your referral discount is waiting!</p><p style=\"color: #666; font-size: 14px; margin: 4px 0 0;\">Sign in to claim your discount on credit purchases</p></div>" if referral_code else ""}
{referral_banner}
<div class="warning">
⏰ {t(locale, "emails.magicLink.expiryWarning")}
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "karaoke-gen"
version = "0.164.1"
version = "0.164.2"
description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
license = "MIT"