avoid error when trying to access typeProvider attribute for wrong objects

This commit is contained in:
Helmut Merz 2012-03-16 12:00:57 +01:00
parent 75fff86351
commit 7bf87c15ac

View file

@ -538,6 +538,8 @@ class BaseView(GenericView, I18NView):
@Lazy
def typeOptions(self):
if self.typeProvider is None:
return DummyOptions()
return IOptions(adapted(self.typeProvider))
def getPredicateOptions(self, relation):