added self.config to the properties
This commit is contained in:
parent
bec906cd54
commit
05168ca5d0
@ -113,6 +113,7 @@ class TiramisuOptionOption:
|
||||
class TiramisuOptionProperty:
|
||||
# config.option(path).property
|
||||
def __init__(self,
|
||||
self.config,
|
||||
path: str,
|
||||
model: Dict) -> None:
|
||||
self.path = path
|
||||
@ -327,6 +328,7 @@ class TiramisuOptionDescription(_Option):
|
||||
self.form)
|
||||
if subfunc == 'property':
|
||||
return TiramisuOptionProperty(self.path,
|
||||
self.config,
|
||||
self.model.get(self.path, {}))
|
||||
if subfunc == 'value':
|
||||
return TiramisuOptionValue(self.config,
|
||||
@ -396,6 +398,7 @@ class TiramisuOption:
|
||||
if self.index != None:
|
||||
raise NotImplementedError()
|
||||
return TiramisuOptionProperty(self.path,
|
||||
self.config,
|
||||
self.model.get(self.path, {}))
|
||||
raise APIError(_('please specify a valid sub function ({})').format(subfunc))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user