diff --git a/backend/app/services/website_sync.py b/backend/app/services/website_sync.py index 7efd992..4452333 100644 --- a/backend/app/services/website_sync.py +++ b/backend/app/services/website_sync.py @@ -181,7 +181,7 @@ def sync_binding(db: Session, binding: WebsiteGroupBinding, write: bool = True) w1 = Decimal("0.85") w_others = Decimal("0.15") / Decimal(N - 1) base = rates_sorted[0] * w1 + sum(rates_sorted[1:], Decimal("0")) * w_others - + if base > 0: effective_percent = (target_rate / base - Decimal("1")) * Decimal("100") auto_percent_str = fixed_decimal_string(effective_percent.quantize(Decimal("0.01"), rounding=ROUND_HALF_UP), 2)