`PlominoColumn` should remove index upon delete/rename #485

jean opened this Issue Nov 18, 2013 · 1 comment


None yet
2 participants

jean commented Nov 18, 2013

If not, document save/refresh will fail until database refresh.

2013-11-18 07:59:42 INFO Plomino indexDocument> AttributeError('casedocid',)
on 74b97dbb3ce842f1875917b5b32297d3
Traceback (most recent call last):
  File "/home/.../Products/CMFPlomino/index/PlominoIndex.py", line 149, in indexDocument
    idxs=idxs, update_metadata=update_metadata)
  File "/home/.../Products/CMFCore/CatalogTool.py", line 266, in catalog_object
  File "/home/.../Products/PDBDebugMode/zcatalog.py", line 20, in catalog_object
    update_metadata=update_metadata, pghandler=pghandler)
  File "/home/.../Products/ZCatalog/ZCatalog.py", line 476, in catalog_object
  File "/home/.../Products/ZCatalog/Catalog.py", line 320, in catalogObject
    index = self.updateMetadata(object, uid, None)
  File "/home/.../Products/ZCatalog/Catalog.py", line 270, in updateMetadata
    newDataRecord = self.recordify(object)
  File "/home/.../Products/CMFPlomino/index/PlominoCatalog.py", line 48, in recordify
    obj.computeColumnValue(viewname, columnname))
  File "/home/.../Products/CMFPlomino/PlominoDocument.py", line 695, in computeColumnValue
    c = v.getColumn(columnname)
  File "/home/.../Products/CMFPlomino/PlominoView.py", line 404, in getColumn
    return getattr(self, column_name)
AttributeError: casedocid

ebrehault commented Nov 21, 2013

yes, unless the column is based on a field (and the field is indexed)

but we should also update the indexes when:

  • we delete/remove a view
  • we delete/remove an indexed field

I agree it would be more confortable to automatise all of that, but a quite simple practice is just to refresh your db when you have index-related issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment