From 7cfd3973ce7596091ec8abd1b314811716c8e93d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 23 Jun 2007 18:47:28 +0000 Subject: - fixed "where"/"from" criterion of select() to accept a unicode string in addition to regular string - both convert to text() --- lib/sqlalchemy/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql.py') diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 92b51dd25..5ceb9bdea 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -2938,7 +2938,7 @@ class Select(_SelectBaseMixin, FromClause): self._append_condition('having', having) def _append_condition(self, attribute, condition): - if type(condition) == str: + if isinstance(condition, basestring): condition = _TextClause(condition) self.__wherecorrelator.traverse(condition) self._process_froms(condition, False) @@ -2957,7 +2957,7 @@ class Select(_SelectBaseMixin, FromClause): self.__correlated[from_obj] = from_obj def append_from(self, fromclause): - if type(fromclause) == str: + if isinstance(fromclause, basestring): fromclause = FromClause(fromclause) self.__correlator.traverse(fromclause) self._process_froms(fromclause, True) -- cgit v1.2.1