fix: serialize webapp datetime payloads

This commit is contained in:
3252a8
2026-05-27 14:55:05 +03:00
parent bd2e67059f
commit 25056602d8
3 changed files with 36 additions and 9 deletions
+4 -8
View File
@@ -688,15 +688,11 @@ async def device_topup_options_route(request: web.Request) -> web.Response:
"currency": settings.DEFAULT_CURRENCY_SYMBOL or "RUB",
"title": f"+{count}",
"subtitle": tariff.name(lang),
"valid_from": (
(rub_quote or stars_quote)["valid_from"].isoformat()
if (rub_quote or stars_quote).get("valid_from")
else None
"valid_from": _billing_iso_datetime(
(rub_quote or stars_quote).get("valid_from")
),
"valid_until": (
(rub_quote or stars_quote)["valid_until"].isoformat()
if (rub_quote or stars_quote).get("valid_until")
else None
"valid_until": _billing_iso_datetime(
(rub_quote or stars_quote).get("valid_until")
),
"proration_ratio": float((rub_quote or stars_quote).get("proration_ratio") or 0),
}