diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-06 10:24:25 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-12-06 10:57:19 -0500 |
commit | a7a8804a836ce9edcfdee7d7406cd3c050b34f05 (patch) | |
tree | 55cd401559f5c5189504515bbba326c3b7a01181 /lib/sqlalchemy/sql/compiler.py | |
parent | 1ab483ac5481cb60e898f0bfdad54e5ca45bbb80 (diff) | |
download | sqlalchemy-a7a8804a836ce9edcfdee7d7406cd3c050b34f05.tar.gz |
Include DISTINCT in error message for label reference
Needed to add tests to ensure this label reference is handled
correctly, so also modified the exception message to
be more clear if someone has this error within distinct().
Change-Id: I6e685e46ae336596272d14366445ac224c18d92c
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 85c1750b7..a28ce465a 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -811,7 +811,10 @@ class SQLCompiler(Compiled): except KeyError: coercions._no_text_coercion( element.element, - extra="Can't resolve label reference for ORDER BY / GROUP BY.", + extra=( + "Can't resolve label reference for ORDER BY / " + "GROUP BY / DISTINCT etc." + ), exc_cls=exc.CompileError, ) else: |