]> CRI, Mines Paris - PSL - Plinn.git/blobdiff - catalog_adapters.py
Quelques améliorations / simplifications / nettoyages dans le style.
[Plinn.git] / catalog_adapters.py
index 64130ad5e88abedc6c6ff08e18ccc9185d0a2148..86b2c3b0e68b18b990b78c74aaf7ff40df852d0c 100644 (file)
@@ -1,7 +1,9 @@
 from Products.CMFCore.CatalogTool import IndexableObjectWrapper
+from OFS.interfaces import IOrderedContainer
 
 class PlinnIndexableObjectWrapper(IndexableObjectWrapper) :
     def position(self) :
         parent = self.getParentNode()
-        pos = parent.getObjectPosition(self.getId())
-        return pos
\ No newline at end of file
+        if IOrderedContainer.providedBy(parent) :
+            pos = parent.getObjectPosition(self.getId())
+            return pos
\ No newline at end of file