Author: jmorliaguet
Date: Mon Jul  3 09:56:29 2006
New Revision: 3599

Modified:
   cpsskins/branches/paris-sprint-2006/browser/tree/slot.py

Log:

- more logging 



Modified: cpsskins/branches/paris-sprint-2006/browser/tree/slot.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/browser/tree/slot.py    (original)
+++ cpsskins/branches/paris-sprint-2006/browser/tree/slot.py    Mon Jul  3 
09:56:29 2006
@@ -243,8 +243,17 @@
                          ).getPerspective()
 
         order = IFormattable(container).getFormat(u'order')
-        if order is not None:
-            return order.index(content.identifier)
+        identifier = content.identifier
+
+        if order is None:
+            logger.warning("the %s container has no order", repr(container))
+            return 0
+
+        if identifier in order:
+            return order.index(identifier)
+        else:
+            logger.warning("Could not get the order of %s", repr(content))
+            return 0
 
 class SlotDuplicating(BrowserView):
     """A view for duplicating elements in nodes
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to