Features: 1) Delete vendor's last processing response if present before saving new data;
Fixes: none; Extra: none;
This commit is contained in:
parent
3b1d20ff14
commit
8889429a02
1 changed files with 4 additions and 0 deletions
4
core/vendors/__init__.py
vendored
4
core/vendors/__init__.py
vendored
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue