From 0c990291a40ac711075f0a0d33b9615b254e1fb0 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Sun, 26 Oct 2025 22:37:38 +0300 Subject: [PATCH] Features: 1) Add currency handling logic in `resolve_price_with_currency` method to ensure correct conversion when the currency matches the provider or default currency; Fixes: 1) None; Extra: 1) None; --- core/vendors/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/vendors/__init__.py b/core/vendors/__init__.py index 909b3fbb..864dfe1c 100644 --- a/core/vendors/__init__.py +++ b/core/vendors/__init__.py @@ -315,6 +315,8 @@ class AbstractVendor: return round(price, 2) def resolve_price_with_currency(self, price: float | int | Decimal, provider: str, currency: str = "") -> float: + if currency == self.currency or currency == settings.CURRENCY_CODE: + return float(price) rates = get_rates(provider) rate = rates.get(currency or self.currency) if rates else 1