Skip to content

Commit

Permalink
Fix error on op selection
Browse files Browse the repository at this point in the history
  • Loading branch information
johannkm committed Oct 16, 2023
1 parent 6f998ba commit c8d59cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python_modules/dagster-graphql/dagster_graphql/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def infer_pipeline_selector(
{
"pipelineName": pipeline_name,
"solidSelection": op_selection,
"assetSelection": [],
"assetCheckSelection": [],
}
)
return selector
Expand Down
4 changes: 3 additions & 1 deletion python_modules/dagster/dagster/_core/instance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,9 @@ def create_run(
check.opt_set_param(asset_selection, "asset_selection", of_type=AssetKey)
check.opt_set_param(asset_check_selection, "asset_check_selection", of_type=AssetCheckKey)

if asset_selection is not None or asset_check_selection is not None:
# asset_selection gets coerced from [] to None, but asset_check_selection doesn't. We
# allow asset_check_selection to be [] when op_selection is set.
if asset_selection is not None or asset_check_selection:
check.invariant(
op_selection is None,
"Cannot pass op_selection with either of asset_selection or asset_check_selection",
Expand Down

0 comments on commit c8d59cd

Please sign in to comment.