updated_at could be empty on Magento

Bug #1301417 reported by Guewen Baconnier @ Camptocamp on 2014-04-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento
Guewen Baconnier @ Camptocamp

Bug Description

the field 'updated_at' could be empty on Magento. It can lead to such an error when exporting a record:

Traceback (most recent call last):
  File "/home/gbaconnier/code/instances/trunk7/parts/openerp-connector/connector/queue/worker.py", line 122, in run_job
  File "/home/gbaconnier/code/instances/trunk7/parts/openerp-connector/connector/queue/job.py", line 472, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/home/gbaconnier/code/instances/trunk7/parts/openerp-connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 215, in export_record
    return exporter.run(binding_id, fields=fields)
  File "/home/gbaconnier/code/instances/trunk7/parts/openerp-connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 106, in run
    should_import = self._should_import()
  File "/home/gbaconnier/code/instances/trunk7/parts/openerp-connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 89, in _should_import
    magento_date = datetime.strptime(record['updated_at'], fmt)
TypeError: strptime() argument 1 must be string, not None

Seriously, this *should not* happen on Magento, at least when the products are edited from the Magento's admin. But it seems that products created from the via imports (maybe the API too?) can create products without updated_at. This should be tolerated.

Related branches

Changed in openerp-connector-magento:
status: New → Fix Committed
assignee: nobody → Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
importance: Undecided → Low
Changed in openerp-connector-magento:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers