Skip to content

Commit

Permalink
Misplaced the error raise
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Jun 19, 2024
1 parent abef023 commit 8603a9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blendsql/blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,11 @@ def _blend(
)
_prev_passed_values = _smoothie.meta.num_values_passed
subtable = _smoothie.df
if len(subtable.columns) != 1:
raise InvalidBlendSQL(
f"Invalid subquery passed to `options`!\nNeeds to return exactly one column, got {len(subtable.columns)} instead"
)
if unpack_kwarg == IngredientKwarg.OPTIONS:
if len(subtable.columns) != 1:
raise InvalidBlendSQL(
f"Invalid subquery passed to `options`!\nNeeds to return exactly one column, got {len(subtable.columns)} instead"
)
# Here, we need to format as a flat set
kwargs_dict[unpack_kwarg] = list(subtable.values.flat)
else:
Expand Down

0 comments on commit 8603a9b

Please sign in to comment.