Fixed #23313 -- Corrected repr(RawQuery) with dict parameters.

This commit is contained in:
Andrew Torpedov 2014-08-17 14:21:48 +00:00 committed by Tim Graham
parent 909015a51b
commit bc06d2c11c
4 changed files with 24 additions and 9 deletions

View file

@ -1596,10 +1596,7 @@ class RawQuerySet(object):
self.query.cursor.close()
def __repr__(self):
text = self.raw_query
if self.params:
text = text % (self.params if hasattr(self.params, 'keys') else tuple(self.params))
return "<RawQuerySet: %r>" % text
return "<RawQuerySet: %s>" % self.query
def __getitem__(self, k):
return list(self)[k]