We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated issue, originally created by Michael Bayer (@zzzeek)
Attachments: 2398.patch
The text was updated successfully, but these errors were encountered:
Michael Bayer (@zzzeek) wrote:
patch:
diff -r 0b97ba8a1410447797c0a1d049b2cfb6cc066ff3 lib/sqlalchemy/cextension/resultproxy.c --- a/lib/sqlalchemy/cextension/resultproxy.c Wed Mar 14 13:10:31 2012 -0700 +++ b/lib/sqlalchemy/cextension/resultproxy.c Wed Mar 14 13:47:15 2012 -0700 @@ -353,7 +353,16 @@ else return tmp; - return BaseRowProxy_subscript(self, name); + tmp = BaseRowProxy_subscript(self, name); + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Format( + PyExc_AttributeError, + "Could not locate column in row for column '%s'", + PyString_AsString(name) + ); + return NULL; + } + return tmp; } /***********************
Sorry, something went wrong.
full patch w changelog
Changes by Michael Bayer (@zzzeek):
7ad0c8c
No branches or pull requests
Migrated issue, originally created by Michael Bayer (@zzzeek)
Attachments: 2398.patch
The text was updated successfully, but these errors were encountered: