some improvements
This commit is contained in:
parent
e2a09320f6
commit
eee24d61a0
|
@ -34,10 +34,12 @@ class Option:
|
||||||
class TiramisuOptionOption:
|
class TiramisuOptionOption:
|
||||||
# config.option(path).option
|
# config.option(path).option
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
config: 'Config',
|
||||||
path: str,
|
path: str,
|
||||||
schema: Dict,
|
schema: Dict,
|
||||||
model: Dict,
|
model: Dict,
|
||||||
form: Dict) -> None:
|
form: Dict) -> None:
|
||||||
|
self.config = config
|
||||||
self._path = path
|
self._path = path
|
||||||
self.schema = schema
|
self.schema = schema
|
||||||
self.model = model
|
self.model = model
|
||||||
|
@ -318,7 +320,8 @@ class TiramisuOptionDescription(_Option):
|
||||||
def __getattr__(self,
|
def __getattr__(self,
|
||||||
subfunc: str) -> Any:
|
subfunc: str) -> Any:
|
||||||
if subfunc == 'option':
|
if subfunc == 'option':
|
||||||
return TiramisuOptionOption(self.path,
|
return TiramisuOptionOption(self.config,
|
||||||
|
self.path,
|
||||||
self.schema,
|
self.schema,
|
||||||
self.model,
|
self.model,
|
||||||
self.form)
|
self.form)
|
||||||
|
@ -368,7 +371,8 @@ class TiramisuOption:
|
||||||
if subfunc == 'option':
|
if subfunc == 'option':
|
||||||
if self.index != None:
|
if self.index != None:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
return TiramisuOptionOption(self.path,
|
return TiramisuOptionOption(self.config,
|
||||||
|
self.path,
|
||||||
self.schema,
|
self.schema,
|
||||||
self.model,
|
self.model,
|
||||||
self.form)
|
self.form)
|
||||||
|
|
Loading…
Reference in New Issue