mirror of
https://github.com/django/django.git
synced 2025-07-30 00:24:26 +00:00
[py3] Removed unnecessary calls to .keys()
when computing the length of a dictionary. This fails on Python 3.
This commit is contained in:
parent
2ae58b20ec
commit
9299dc42ed
4 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@ from django.db.models.sql import compiler
|
|||
class SQLCompiler(compiler.SQLCompiler):
|
||||
def resolve_columns(self, row, fields=()):
|
||||
values = []
|
||||
index_extra_select = len(self.query.extra_select.keys())
|
||||
index_extra_select = len(self.query.extra_select)
|
||||
for value, field in map(None, row[index_extra_select:], fields):
|
||||
if (field and field.get_internal_type() in ("BooleanField", "NullBooleanField") and
|
||||
value in (0, 1)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue