From 56a307ecc4a84fab4a72ce037fe39ad20fbc16f7 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Benoi=CC=82t=20Pin?= <benoit.pin@gmail.com>
Date: Wed, 3 Jul 2013 23:49:45 +0200
Subject: [PATCH] =?utf8?q?bugfix=C2=A0:=20on=20v=C3=A9rifie=20que=20le=20p?=
 =?utf8?q?arent=20impl=C3=A9mente=20bien=20l'interface=20d'ordonancement.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 catalog_adapters.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/catalog_adapters.py b/catalog_adapters.py
index 64130ad..86b2c3b 100644
--- a/catalog_adapters.py
+++ b/catalog_adapters.py
@@ -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
-- 
2.20.1