From ec052bdc8f8dbb40b5fe4ccc7b2b7c2b5a89516e Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Wed, 24 Mar 2010 07:43:51 +0000
Subject: [PATCH] Correct catalog keyword

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34034 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Resource.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py
index ca0f2bbc89..04b1780429 100644
--- a/product/ERP5/Document/Resource.py
+++ b/product/ERP5/Document/Resource.py
@@ -297,10 +297,12 @@ class Resource(XMLMatrix, Variated):
         return method(context)
 
       if context is None:
-        transformation_list = self.portal_catalog(portal_type="Transformation",
-                                            resource_category_uid=self.getUid(),
-                                            sort_on=[('version', 'descending')],
-                                            limit=1)
+        transformation_list = self.portal_catalog(
+            portal_type="Transformation",
+            resource_relative_url=self.getRelativeUrl(),
+            sort_on=[('version', 'descending')],
+            limit=1
+        )
         if len(transformation_list) > 0:
           return transformation_list[0].getObject()
         return None
-- 
2.30.9