avoid erroneous use of target view

This commit is contained in:
Helmut Merz 2014-09-09 17:32:54 +02:00
parent 7e9a68bde1
commit 71cdde4308

View file

@ -440,7 +440,7 @@ class NodeView(BaseView):
def targetView(self, name='index.html', methodName='show'):
if name == 'index.html': # only when called for default view
tv = self.viewAnnotations.get('targetView')
if tv is not None:
if tv is not None and callable(tv):
return tv()
if '?' in name:
name, params = name.split('?', 1)