entity.py
branchstable
changeset 1842 c7a22540d6f7
parent 1840 f4b5c15d1147
child 1904 e23536d29231
--- a/entity.py	Mon May 18 14:08:21 2009 +0200
+++ b/entity.py	Mon May 18 14:22:26 2009 +0200
@@ -380,7 +380,12 @@
         if getattr(self.req, 'search_state', ('normal',))[0] == 'normal':
             kwargs['base_url'] = self.metainformation()['source'].get('base-url')
         if method is None or method == 'view':
-            kwargs['_restpath'] = self.rest_path(kwargs.get('base_url'))
+            try:
+                kwargs['_restpath'] = self.rest_path(kwargs.get('base_url'))
+            except TypeError:
+                warn('%s: rest_path() now take use_ext_eid argument, '
+                     'please update' % self.id, DeprecationWarning)
+                kwargs['_restpath'] = self.rest_path()
         else:
             kwargs['rql'] = 'Any X WHERE X eid %s' % self.eid
         return self.build_url(method, **kwargs)