some improvements

This commit is contained in:
Emmanuel Garette 2019-02-08 11:11:06 +01:00
parent e2a09320f6
commit eee24d61a0

View File

@ -34,10 +34,12 @@ class Option:
class TiramisuOptionOption:
# config.option(path).option
def __init__(self,
config: 'Config',
path: str,
schema: Dict,
model: Dict,
form: Dict) -> None:
self.config = config
self._path = path
self.schema = schema
self.model = model
@ -318,7 +320,8 @@ class TiramisuOptionDescription(_Option):
def __getattr__(self,
subfunc: str) -> Any:
if subfunc == 'option':
return TiramisuOptionOption(self.path,
return TiramisuOptionOption(self.config,
self.path,
self.schema,
self.model,
self.form)
@ -368,7 +371,8 @@ class TiramisuOption:
if subfunc == 'option':
if self.index != None:
raise NotImplementedError()
return TiramisuOptionOption(self.path,
return TiramisuOptionOption(self.config,
self.path,
self.schema,
self.model,
self.form)