Created
October 24, 2012 15:39
-
-
Save ivanjr0/3946827 to your computer and use it in GitHub Desktop.
Patch no debug toolbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Para mais informações sobre o bug: | |
https://github.com/django-debug-toolbar/django-debug-toolbar/pull/298 | |
https://github.com/django-debug-toolbar/django-debug-toolbar/pull/316 | |
""" | |
# debug_toolbar/utils/tracking/db.py | |
class NormalCursorWrapper(object): | |
# ... | |
# Versao atual: | |
def _quote_params(self, params): | |
if isinstance(params, dict): | |
return dict((key, self._quote_expr(value)) | |
for key, value in params.iteritems()) | |
return map(self._quote_expr, params) | |
# Versao com o path: | |
def _quote_params(self, params): | |
# XXX: https://gist.github.com/gists/3946827/ | |
if not params: | |
return params | |
elif isinstance(params, dict): | |
return dict((key, self._quote_expr(value)) | |
for key, value in params.iteritems()) | |
return map(self._quote_expr, params) | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment