diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-19 10:34:31 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-19 10:34:31 -0400 |
commit | ed515f2ca16e1b40efe5ee0299417f8d6eb51b86 (patch) | |
tree | 7e27deed98e467eea2fc0f99796869f358c1497c /lib/sqlalchemy/sql/coercions.py | |
parent | 37ef5f38523329f3e881c4f70d38d5589510af9f (diff) | |
download | sqlalchemy-ed515f2ca16e1b40efe5ee0299417f8d6eb51b86.tar.gz |
Correct for coercion from list args to positional for case
Fixed regression in the :func:`_sql.case` construct, where the "dictionary"
form of argument specification failed to work correctly if it were passed
positionally, rather than as a "whens" keyword argument.
Fixes: #6097
Change-Id: I4138f54309a08c8e4e63cfafc211176e0b9a76c7
Diffstat (limited to 'lib/sqlalchemy/sql/coercions.py')
-rw-r--r-- | lib/sqlalchemy/sql/coercions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/coercions.py b/lib/sqlalchemy/sql/coercions.py index 76ba7e214..35ac1a5ba 100644 --- a/lib/sqlalchemy/sql/coercions.py +++ b/lib/sqlalchemy/sql/coercions.py @@ -98,7 +98,7 @@ def _document_text_coercion(paramname, meth_rst, param_rst): def _expression_collection_was_a_list(attrname, fnname, args): - if args and isinstance(args[0], (list, set)) and len(args) == 1: + if args and isinstance(args[0], (list, set, dict)) and len(args) == 1: util.warn_deprecated_20( 'The "%s" argument to %s() is now passed as a series of ' "positional " |