From 42fd4c94eabec92df4349661a06c2c938b3ff80d Mon Sep 17 00:00:00 2001 From: Johann Miller Date: Mon, 16 Oct 2023 11:52:35 -0400 Subject: [PATCH] Fix error on op selection --- python_modules/dagster-graphql/dagster_graphql/test/utils.py | 2 ++ python_modules/dagster/dagster/_core/instance/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python_modules/dagster-graphql/dagster_graphql/test/utils.py b/python_modules/dagster-graphql/dagster_graphql/test/utils.py index 9b74d12500b69..874ae986fe271 100644 --- a/python_modules/dagster-graphql/dagster_graphql/test/utils.py +++ b/python_modules/dagster-graphql/dagster_graphql/test/utils.py @@ -201,6 +201,8 @@ def infer_pipeline_selector( { "pipelineName": pipeline_name, "solidSelection": op_selection, + "assetSelection": [], + "assetCheckSelection": [], } ) return selector diff --git a/python_modules/dagster/dagster/_core/instance/__init__.py b/python_modules/dagster/dagster/_core/instance/__init__.py index 8fec0e07392e1..55a228e188992 100644 --- a/python_modules/dagster/dagster/_core/instance/__init__.py +++ b/python_modules/dagster/dagster/_core/instance/__init__.py @@ -1461,7 +1461,7 @@ 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: + 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",