summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index f70496418..251102d59 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -117,8 +117,8 @@ def type_coerce(expr, type_):
"""
type_ = type_api.to_instance(type_)
- if hasattr(expr, '__clause_expr__'):
- return type_coerce(expr.__clause_expr__())
+ if hasattr(expr, '__clause_element__'):
+ return type_coerce(expr.__clause_element__(), type_)
elif isinstance(expr, BindParameter):
bp = expr._clone()
bp.type = type_