diff options
Diffstat (limited to 'lib/sqlalchemy/sql/coercions.py')
-rw-r--r-- | lib/sqlalchemy/sql/coercions.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/coercions.py b/lib/sqlalchemy/sql/coercions.py index 820fc1bf1..517bfd57d 100644 --- a/lib/sqlalchemy/sql/coercions.py +++ b/lib/sqlalchemy/sql/coercions.py @@ -561,9 +561,10 @@ class InElementImpl(RoleImpl): return element.self_group(against=operator) elif isinstance(element, elements.BindParameter): - # previously we were adding expanding flags here but - # we now do this in the compiler where we have more context - # see compiler.py -> _render_in_expr_w_bindparam + element = element._clone(maintain_key=True) + element.expanding = True + element.expand_op = operator + return element else: return element |