479 # in linksearch mode, we don't want external urls else selecting |
479 # in linksearch mode, we don't want external urls else selecting |
480 # the object for use in the relation is tricky |
480 # the object for use in the relation is tricky |
481 # XXX search_state is web specific |
481 # XXX search_state is web specific |
482 if getattr(self._cw, 'search_state', ('normal',))[0] == 'normal': |
482 if getattr(self._cw, 'search_state', ('normal',))[0] == 'normal': |
483 kwargs['base_url'] = self.cw_metainformation()['source'].get('base-url') |
483 kwargs['base_url'] = self.cw_metainformation()['source'].get('base-url') |
|
484 use_ext_id = True |
|
485 else: |
|
486 use_ext_id = False |
484 if method in (None, 'view'): |
487 if method in (None, 'view'): |
485 try: |
488 try: |
486 kwargs['_restpath'] = self.rest_path(kwargs.get('base_url')) |
489 kwargs['_restpath'] = self.rest_path(use_ext_id) |
487 except TypeError: |
490 except TypeError: |
488 warn('[3.4] %s: rest_path() now take use_ext_eid argument, ' |
491 warn('[3.4] %s: rest_path() now take use_ext_eid argument, ' |
489 'please update' % self.__regid__, DeprecationWarning) |
492 'please update' % self.__regid__, DeprecationWarning) |
490 kwargs['_restpath'] = self.rest_path() |
493 kwargs['_restpath'] = self.rest_path() |
491 else: |
494 else: |