diff options
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 23fdf7e12..ee2c4dafc 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -4861,7 +4861,11 @@ class Select( constructs as given, as well as ORM-mapped classes. """ - if (args and isinstance(args[0], list)) or kw: + if ( + args + and hasattr(args[0], "__iter__") + and not isinstance(args[0], util.string_types + (ClauseElement,)) + ) or kw: return cls.create_legacy_select(*args, **kw) else: return cls._create_future_select(*args) |
