Skip to content

Commit

Permalink
Correctly resolve pipelines defined on View (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Oct 6, 2022
1 parent 39968df commit 9423eab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lumen/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ def from_spec(cls, spec, filters=None, pipelines={}):
if isinstance(view_specs, dict):
view_spec = dict(view_specs[view], name=view)
else:
view_spec = view
if 'table' in view_spec and view_spec['table'] in pipelines:
view_spec = view.copy()
if 'pipeline' in view_spec:
pipeline = Pipeline.from_spec(view_spec.pop('pipeline'))
elif 'table' in view_spec and view_spec['table'] in pipelines:
pipeline = pipelines[view_spec['table']]
elif len(pipelines) == 1:
pipeline = list(pipelines.values())[0]
Expand Down

0 comments on commit 9423eab

Please sign in to comment.