object creation: take type options from object to be created

This commit is contained in:
Helmut Merz 2016-10-04 15:12:00 +02:00
parent e27f4000f7
commit ccc9886113

View file

@ -615,6 +615,11 @@ class BaseView(GenericView, I18NView):
def typeOptions(self): def typeOptions(self):
if self.typeProvider is None: if self.typeProvider is None:
return DummyOptions() return DummyOptions()
if getattr(self.adapted, '__is_dummy__', None):
typeToken = getattr(self, 'typeToken', None)
if typeToken is not None:
typeProvider = self.loopsRoot.loopsTraverse(typeToken)
return IOptions(adapted(typeProvider))
return IOptions(adapted(self.typeProvider)) return IOptions(adapted(self.typeProvider))
@Lazy @Lazy