mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-01 21:28:00 +00:00
🐛(backend) serialize lazy title in summary payload
_generate_title returned a lazy gettext_lazy proxy in the recording_datetime is None branch, which json.dumps cannot serialize. This crashed requests.post(json=payload) with "Object of type __proxy__ is not JSON serializable" whenever the LiveKit egress lookup failed (started_at=None). Force evaluation with a non-lazy method. Add a regression test asserting the v2 payload is a real str and is JSON-serializable when timestamps are unavailable. The existing without_metadata test missed this: mocked requests.post never serialized, and a lazy proxy compares equal to its string.
This commit is contained in:
committed by
aleb_the_flash
parent
bc003f928e
commit
00a2bd9558
@@ -9,7 +9,7 @@ from zoneinfo import ZoneInfo, ZoneInfoNotFoundError
|
||||
from django.conf import settings
|
||||
from django.core.mail import send_mail
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import get_language, override
|
||||
from django.utils.translation import get_language, gettext, override
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import aiohttp
|
||||
@@ -121,7 +121,7 @@ class NotificationService:
|
||||
msg_plain = render_to_string(
|
||||
"mail/text/screen_recording.txt", personalized_context
|
||||
)
|
||||
subject = str(_("Your recording is ready")) # Force translation
|
||||
subject = gettext("Your recording is ready") # Force translation
|
||||
|
||||
try:
|
||||
send_mail(
|
||||
@@ -192,7 +192,7 @@ class NotificationService:
|
||||
"""Generate title from context or return default."""
|
||||
if recording_datetime is None:
|
||||
with override(locale):
|
||||
return _("Transcription")
|
||||
return gettext("Transcription")
|
||||
|
||||
dt = recording_datetime
|
||||
if owner_timezone:
|
||||
|
||||
Reference in New Issue
Block a user