entity.py
changeset 7552 82dde8276a5b
parent 7543 570522300e22
child 7702 73cadb5d0097
child 7899 4f6ff757f83c
--- a/entity.py	Wed Jun 22 12:31:55 2011 +0200
+++ b/entity.py	Wed Jun 22 18:53:36 2011 +0200
@@ -433,9 +433,11 @@
         use_ext_id = False
         if 'base_url' not in kwargs and \
                getattr(self._cw, 'search_state', ('normal',))[0] == 'normal':
-            baseurl = self.cw_metainformation()['source'].get('base-url')
-            if baseurl:
-                kwargs['base_url'] = baseurl
+            sourcemeta = self.cw_metainformation()['source']
+            if sourcemeta.get('use-cwuri-as-url'):
+                return self.cwuri # XXX consider kwargs?
+            if sourcemeta.get('base-url'):
+                kwargs['base_url'] = sourcemeta['base-url']
                 use_ext_id = True
         if method in (None, 'view'):
             try: