In https://github.com/4teamwork/ftw.solr/issues/165 we fixed a rounding issue with the conversion of zope DateTime objects. We now need to update the modified index in solr to mirror that change and avoid having half the objects recognised as out of sync...
For the implementation of the upgrade, I copied the code from ftw.solr.browser.maintenance and tried to modify it as little as possible. The main differences are:
Use brains instead of objects as source of data
Only sync the modified index for objects that were marked as in sync before the change in rounding introdiced in https://github.com/4teamwork/ftw.solr/issues/165 but are now recognised as out of sync. These are the objects are marked as out of sync just because of the change in rounding of modified
I also add tests that conversion works the same for python datetime and zope DateTime objects.
In https://github.com/4teamwork/ftw.solr/issues/165 we fixed a rounding issue with the conversion of zope
DateTime
objects. We now need to update themodified
index in solr to mirror that change and avoid having half the objects recognised as out of sync...For the implementation of the upgrade, I copied the code from
ftw.solr.browser.maintenance
and tried to modify it as little as possible. The main differences are:modified
index for objects that were marked as in sync before the change in rounding introdiced in https://github.com/4teamwork/ftw.solr/issues/165 but are now recognised as out of sync. These are the objects are marked as out of sync just because of the change in rounding ofmodified
I also add tests that conversion works the same for python datetime and zope DateTime objects.
For https://github.com/4teamwork/ftw.solr/issues/165