config as first argument
This commit is contained in:
parent
f7119d5b4c
commit
9cc096a7db
|
@ -113,7 +113,7 @@ class TiramisuOptionOption:
|
||||||
class TiramisuOptionProperty:
|
class TiramisuOptionProperty:
|
||||||
# config.option(path).property
|
# config.option(path).property
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
config,
|
config: 'Config',
|
||||||
path: str,
|
path: str,
|
||||||
model: Dict) -> None:
|
model: Dict) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
|
@ -328,8 +328,8 @@ class TiramisuOptionDescription(_Option):
|
||||||
self.model,
|
self.model,
|
||||||
self.form)
|
self.form)
|
||||||
if subfunc == 'property':
|
if subfunc == 'property':
|
||||||
return TiramisuOptionProperty(self.path,
|
return TiramisuOptionProperty(self.config,
|
||||||
self.config,
|
self.path,
|
||||||
self.model.get(self.path, {}))
|
self.model.get(self.path, {}))
|
||||||
if subfunc == 'value':
|
if subfunc == 'value':
|
||||||
return TiramisuOptionValue(self.config,
|
return TiramisuOptionValue(self.config,
|
||||||
|
@ -398,8 +398,8 @@ class TiramisuOption:
|
||||||
if subfunc == 'property':
|
if subfunc == 'property':
|
||||||
if self.index != None:
|
if self.index != None:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
return TiramisuOptionProperty(self.path,
|
return TiramisuOptionProperty(self.config,
|
||||||
self.config,
|
self.path,
|
||||||
self.model.get(self.path, {}))
|
self.model.get(self.path, {}))
|
||||||
raise APIError(_('please specify a valid sub function ({})').format(subfunc))
|
raise APIError(_('please specify a valid sub function ({})').format(subfunc))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue