fix: VK API returns prices in rubles, not kopecks — remove /100 division

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-05-12 22:40:52 +03:00
parent b926ca0b90
commit d25caa2b96

View File

@@ -105,9 +105,9 @@ def _sync_user(db, user_id: int, token: str, group_id: str) -> None:
price_field = p.get("price")
if isinstance(price_field, dict):
price_raw = price_field.get("amount")
price = float(price_raw) / 100 if price_raw is not None else None
price = float(price_raw) if price_raw is not None else None
else:
price = float(price_field) / 100 if price_field is not None else None
price = float(price_field) if price_field is not None else None
thumb = None
thumb_field = p.get("thumb_photo")
if isinstance(thumb_field, dict):