mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-03-07 22:43:07 +00:00
- Reset TrafficPurchase records and purchased_traffic_gb when renewing expired subscriptions (was incorrectly preserving stale purchases, inflating traffic limit e.g. 100GB+20GB=120GB instead of fresh 100GB) - Fix in extend_subscription() CRUD, cabinet /renew, bot handlers, simple_subscription handlers - Add RemnaWave sync to cabinet /renew endpoint after subscription changes - Fix device_price_kopeks=0 falsy-zero bug (11+ instances, or → is not None) - Fix double-increment of purchased_traffic_gb in cabinet traffic purchase - Fix orphaned TrafficPurchase records in 5 locations (replace_subscription, extend_subscription fixed_with_topup, classic mode, switch_tariff, purchase.py is_traffic_fixed) - Fix admin_users.py UnboundLocalError from TrafficPurchase inline import shadowing module-level import - Standardize pricing order: base + devices → promo_group → promo_offer across all 5+ pricing paths (cabinet, miniapp, autopay, auto-purchase, monitoring) - Fix exception handlers in calculate_renewal_price (raise instead of returning fallback 0) - Fix monitoring_service double-discount (promo_offer applied twice) - Fix auto-purchase _get_tariff_price_for_period return type to tuple (base_price, discount_percent) so callers add devices before discount - Pass traffic_limit_gb/device_limit to extend_subscription in simple_subscription.py instead of manual overwrites