diff --git a/tiramisu_json_api/api.py b/tiramisu_json_api/api.py index 8d8e13a..980d4e9 100644 --- a/tiramisu_json_api/api.py +++ b/tiramisu_json_api/api.py @@ -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)