Добавлен провайдер доставки CSE: SOAP-адаптер (Calc + SaveDocuments), маршрутизация init-payment по провайдеру, обобщение tariff_code до строки, география CSE в cities_map
Deploy / deploy (push) Failing after 52s
Deploy / deploy (push) Failing after 52s
This commit is contained in:
+9
-2
@@ -47,7 +47,7 @@ class ProviderPrice:
|
||||
currency: str
|
||||
delivery_days_min: int
|
||||
delivery_days_max: int
|
||||
tariff_code: int | None = None
|
||||
tariff_code: str | None = None
|
||||
bypass_parcel_type_filter: bool = False
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ def _normalize_price(
|
||||
currency=currency,
|
||||
delivery_days_min=min_days,
|
||||
delivery_days_max=max_days,
|
||||
tariff_code=_try_to_int(_get_optional_attr(candidate, "tariff_code")),
|
||||
tariff_code=_try_to_str(_get_optional_attr(candidate, "tariff_code")),
|
||||
bypass_parcel_type_filter=_extract_bypass_parcel_type_filter(candidate),
|
||||
)
|
||||
|
||||
@@ -271,6 +271,13 @@ def _normalize_text(value: object) -> str:
|
||||
return str(value).strip()
|
||||
|
||||
|
||||
def _try_to_str(value: object) -> str | None:
|
||||
if value is _MISSING or value is None:
|
||||
return None
|
||||
text = str(value).strip()
|
||||
return text or None
|
||||
|
||||
|
||||
def _normalize_city_id(value: object) -> int:
|
||||
city_id = _try_to_int(value)
|
||||
if city_id is None:
|
||||
|
||||
Reference in New Issue
Block a user