entity.py
branchstable
changeset 6100 3cd1e6a74830
parent 6099 b22a4a3895df
child 6124 c5900230809b
--- 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'):