Features: 1) Delete vendor's last processing response if present before saving new data;

Fixes: none;

Extra: none;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-10-15 17:17:36 +03:00
parent 3b1d20ff14
commit 8889429a02

View file

@ -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")