378 # the object for use in the relation is tricky |
378 # the object for use in the relation is tricky |
379 # XXX search_state is web specific |
379 # XXX search_state is web specific |
380 if getattr(self.req, 'search_state', ('normal',))[0] == 'normal': |
380 if getattr(self.req, 'search_state', ('normal',))[0] == 'normal': |
381 kwargs['base_url'] = self.metainformation()['source'].get('base-url') |
381 kwargs['base_url'] = self.metainformation()['source'].get('base-url') |
382 if method is None or method == 'view': |
382 if method is None or method == 'view': |
383 kwargs['_restpath'] = self.rest_path(kwargs.get('base_url')) |
383 try: |
|
384 kwargs['_restpath'] = self.rest_path(kwargs.get('base_url')) |
|
385 except TypeError: |
|
386 warn('%s: rest_path() now take use_ext_eid argument, ' |
|
387 'please update' % self.id, DeprecationWarning) |
|
388 kwargs['_restpath'] = self.rest_path() |
384 else: |
389 else: |
385 kwargs['rql'] = 'Any X WHERE X eid %s' % self.eid |
390 kwargs['rql'] = 'Any X WHERE X eid %s' % self.eid |
386 return self.build_url(method, **kwargs) |
391 return self.build_url(method, **kwargs) |
387 |
392 |
388 def rest_path(self, use_ext_eid=False): |
393 def rest_path(self, use_ext_eid=False): |