Skip to content

Commit

Permalink
[Fix] node_id could be str or list
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Huang <[email protected]>
  • Loading branch information
kentwelcome committed Dec 11, 2024
1 parent 46046ae commit 7680d97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recce/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ def schema_diff_should_be_approved(check_params: dict) -> bool:

if 'node_id' in check_params:
# If the node_id is provided, then use it
selected_node_ids = check_params.get('node_id', [])
if isinstance(check_params['node_id'], str):
selected_node_ids = [check_params['node_id']]
else:
selected_node_ids = check_params.get('node_id', [])
else:
# Otherwise, select the nodes based on the select/exclude/packages/view_mode
selected_node_ids = context.adapter.select_nodes(
Expand Down

0 comments on commit 7680d97

Please sign in to comment.