mirror of
https://github.com/django/django.git
synced 2025-10-30 17:16:10 +00:00
Fixed #23313 -- Corrected repr(RawQuery) with dict parameters.
This commit is contained in:
committed by
Tim Graham
parent
909015a51b
commit
bc06d2c11c
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user