From 0b5488a642235066b47edb4532514a66fc3b8e20 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 22 Feb 2020 10:54:44 -0800 Subject: [PATCH] Link lexicon cdc from model --- amanuensis/lexicon/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amanuensis/lexicon/__init__.py b/amanuensis/lexicon/__init__.py index 86ad1af..1803b89 100644 --- a/amanuensis/lexicon/__init__.py +++ b/amanuensis/lexicon/__init__.py @@ -3,7 +3,7 @@ import time from amanuensis.errors import ( ArgumentError, IndexMismatchError, MissingConfigError) -from amanuensis.config import prepend, json_ro, json_rw +from amanuensis.config import prepend, json_ro, json_rw, root class LexiconModel(): @staticmethod @@ -40,6 +40,7 @@ class LexiconModel(): self.config_path = prepend('lexicon', lid, 'config.json') with json_ro(self.config_path) as j: self.config = j + self.ctx = root.lexicon[self.id] def __getattr__(self, key): if key not in self.config: