mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Fixed #23313 -- Corrected repr(RawQuery) with dict parameters.
This commit is contained in:
parent
909015a51b
commit
bc06d2c11c
4 changed files with 24 additions and 9 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue