From 5b1f4695a07be9eae704fc2ef092692b5f8974c9 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Fri, 27 Jun 2008 11:09:33 +0000
Subject: [PATCH] Return objects.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22015 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_dms/Document_getRelatedDocumentList.xml  | 15 +++++++++------
 bt5/erp5_dms/bt/revision                          |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_getRelatedDocumentList.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_getRelatedDocumentList.xml
index 05c4d9ecd5..a927cf328d 100644
--- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_getRelatedDocumentList.xml
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_getRelatedDocumentList.xml
@@ -85,12 +85,15 @@ def getRelatedLatest(category):\n
   funcname = \'get%sValueList\' % convertToUpperCase(category)\n
   func = getattr(context, funcname)\n
   return [o.getLatestVersionValue() for o in func()]\n
-\n
+  \n
 relation_id = kw.get(\'relation_id\') # XXX-JPS Change \'what\' to more explicit name and include in API of script\n
+\n
 if relation_id == \'wiki_predecessor\':\n
-  return context.getImplicitPredecessorValueList()\n
+  return [i.getObject()\n
+          for i in context.getImplicitPredecessorValueList()]\n
 if relation_id == \'wiki_successor\':\n
-  return context.getImplicitSuccessorValueList()\n
+  return [i.getObject() \n
+          for i in context.getImplicitSuccessorValueList()]\n
 if relation_id.startswith(\'related\'):\n
   return getRelatedLatest(relation_id[8:])\n
 if relation_id == \'cloud\':\n
@@ -165,13 +168,13 @@ return [] # failover - undefined relation\n
                             <string>getRelatedLatest</string>
                             <string>_getattr_</string>
                             <string>relation_id</string>
-                            <string>context</string>
-                            <string>_getitem_</string>
-                            <string>dic</string>
                             <string>append</string>
                             <string>$append0</string>
                             <string>_getiter_</string>
+                            <string>context</string>
                             <string>i</string>
+                            <string>_getitem_</string>
+                            <string>dic</string>
                             <string>predecessor_value_list</string>
                             <string>successor_value_list</string>
                             <string>similar_value_list</string>
diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision
index 2a0f68ff7a..c3398755ea 100644
--- a/bt5/erp5_dms/bt/revision
+++ b/bt5/erp5_dms/bt/revision
@@ -1 +1 @@
-899
\ No newline at end of file
+901
\ No newline at end of file
-- 
2.30.9