mirror of
https://github.com/django/django.git
synced 2025-11-29 06:51:10 +00:00
Fixed #23460 -- Added literal %s support to extra() QuerySets.
This commit is contained in:
parent
17557d068c
commit
ef5f9b6ae8
4 changed files with 26 additions and 6 deletions
|
|
@ -1775,7 +1775,8 @@ class Query(object):
|
|||
entry_params = []
|
||||
pos = entry.find("%s")
|
||||
while pos != -1:
|
||||
entry_params.append(next(param_iter))
|
||||
if pos == 0 or entry[pos - 1] != '%':
|
||||
entry_params.append(next(param_iter))
|
||||
pos = entry.find("%s", pos + 2)
|
||||
select_pairs[name] = (entry, entry_params)
|
||||
# This is order preserving, since self.extra_select is an OrderedDict.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue