[entity] base_url argument may be explicitly specified for other purpose (eg http/https site version control) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 11 Aug 2010 16:17:05 +0200
branchstable
changeset 6098 a0fde9334dd0
parent 6097 27e48fb7f113
child 6099 b22a4a3895df
[entity] base_url argument may be explicitly specified for other purpose (eg http/https site version control)
entity.py
--- a/entity.py	Wed Aug 11 16:16:25 2010 +0200
+++ b/entity.py	Wed Aug 11 16:17:05 2010 +0200
@@ -481,9 +481,12 @@
         # XXX search_state is web specific
         if getattr(self._cw, 'search_state', ('normal',))[0] == 'normal':
             kwargs['base_url'] = self.cw_metainformation()['source'].get('base-url')
+            use_ext_id = True
+        else:
+            use_ext_id = False
         if method in (None, 'view'):
             try:
-                kwargs['_restpath'] = self.rest_path(kwargs.get('base_url'))
+                kwargs['_restpath'] = self.rest_path(use_ext_id)
             except TypeError:
                 warn('[3.4] %s: rest_path() now take use_ext_eid argument, '
                      'please update' % self.__regid__, DeprecationWarning)