From cb46ae4fe97d364e8a160b6114519f125432c1e8 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 4 Dec 2007 17:06:55 +0000 Subject: - relaxed rules on column_property() expressions having labels; any ColumnElement is accepted now, as the compiler auto-labels non-labeled ColumnElements now. a selectable, like a select() statement, still requires conversion to ColumnElement via as_scalar() or label(). --- lib/sqlalchemy/sql/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 9b24dd521..d94d3fef6 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -438,7 +438,7 @@ class DefaultCompiler(engine.Compiled): if isinstance(column, sql._Label): return column - if select.use_labels and column._label: + if select.use_labels and getattr(column, '_label', None): return column.label(column._label) if \ -- cgit v1.2.1