From 8889429a02778d32f28ce714bfdbfdcaf9b473d3 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Wed, 15 Oct 2025 17:17:36 +0300 Subject: [PATCH] Features: 1) Delete vendor's last processing response if present before saving new data; Fixes: none; Extra: none; --- core/vendors/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/vendors/__init__.py b/core/vendors/__init__.py index 124e6dc6..b4eeafbd 100644 --- a/core/vendors/__init__.py +++ b/core/vendors/__init__.py @@ -106,6 +106,10 @@ class AbstractVendor: if settings.DEBUG or config.SAVE_VENDORS_RESPONSES: vendor_instance = self.get_vendor_instance() + if vendor_instance.last_processing_response: + with suppress(Exception): + vendor_instance.last_processing_response.delete(save=False) + json_data = json.dumps(data, indent=2, ensure_ascii=False, default=str) json_bytes = json_data.encode("utf-8")