Skip to content

Commit

Permalink
short fix to get_pipelines_by_datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
htahir1 committed Jan 31, 2021
1 parent e852b8b commit 018b81c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zenml/core/repo/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,11 @@ def get_pipelines_by_datasource(self, datasource):
pipelines = []
for file_path in self.get_pipeline_file_paths():
c = yaml_utils.read_yaml(file_path)
if c[keys.GlobalKeys.PIPELINE][keys.PipelineKeys.DATASOURCE][
keys.DatasourceKeys.ID] == datasource._id:
pipelines.append(BasePipeline.from_config(c))
if keys.DatasourceKeys.ID in c[keys.GlobalKeys.PIPELINE][
keys.PipelineKeys.DATASOURCE]:
if c[keys.GlobalKeys.PIPELINE][keys.PipelineKeys.DATASOURCE][
keys.DatasourceKeys.ID] == datasource._id:
pipelines.append(BasePipeline.from_config(c))
return pipelines

@track(event=GET_PIPELINES)
Expand Down

0 comments on commit 018b81c

Please sign in to comment.