Skip to content

Commit

Permalink
Ensure inter-variable references do not error
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 17, 2022
1 parent 5a6d9f3 commit a539aa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lumen/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ def __init__(self, **params):
self._refs = params.pop('refs', {})
super().__init__(**params)
for p, ref in self._refs.items():
if isinstance(ref, str) and ref.startswith('$variables.'):
if isinstance(state.variables, dict):
continue
elif isinstance(ref, str) and ref.startswith('$variables.'):
ref = ref.split('$variables.')[1]
state.variables.param.watch(partial(self._update_ref, p), ref)

Expand Down

0 comments on commit a539aa2

Please sign in to comment.