fix bug introduced by 6098:a0fde9334dd0 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 11 Aug 2010 18:11:32 +0200
branchstable
changeset 6100 3cd1e6a74830
parent 6099 b22a4a3895df
child 6101 1aff7367a20c
fix bug introduced by 6098:a0fde9334dd0
entity.py
--- a/entity.py	Wed Aug 11 15:54:44 2010 +0200
+++ b/entity.py	Wed Aug 11 18:11:32 2010 +0200
@@ -491,9 +491,10 @@
         # in linksearch mode, we don't want external urls else selecting
         # the object for use in the relation is tricky
         # XXX search_state is web specific
-        if getattr(self._cw, 'search_state', ('normal',))[0] == 'normal':
+        if 'base-url' not in kwargs and \
+               getattr(self._cw, 'search_state', ('normal',))[0] == 'normal':
             kwargs['base_url'] = self.cw_metainformation()['source'].get('base-url')
-            use_ext_id = True
+            use_ext_id = bool(kwargs['base_url'])
         else:
             use_ext_id = False
         if method in (None, 'view'):