From 55d64f775149524b7cb166c2f98e50d42533b55a Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 9 Nov 2022 19:31:17 +0000 Subject: [PATCH] [FIX] connector_opencart: product update with checkpoint_summary --- connector_opencart/models/product/importer.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/connector_opencart/models/product/importer.py b/connector_opencart/models/product/importer.py index b5043567..6157bd81 100644 --- a/connector_opencart/models/product/importer.py +++ b/connector_opencart/models/product/importer.py @@ -79,6 +79,14 @@ class ProductImporter(Component): binding = super(ProductImporter, self)._create(data) self.backend_record.add_checkpoint(binding, summary=checkpoint_summary) return binding + + def _update(self, binding, data): + checkpoint_summary = data.get('checkpoint_summary', '') + if 'checkpoint_summary' in data: + del data['checkpoint_summary'] + if checkpoint_summary: + self.backend_record.add_checkpoint(binding, summary=checkpoint_summary) + return super()._update(binding, data) def _after_import(self, binding): self._sync_options(binding)