1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Update django/db/models/sql/compiler.py

Co-authored-by: Lily Foote <code@lilyf.org>
This commit is contained in:
Tom Forbes 2024-11-24 18:27:31 +00:00 committed by GitHub
parent 29311aae15
commit c462ade332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2111,7 +2111,7 @@ class SQLBulkUpdateCompiler(SQLCompiler):
def get_set_sql_clause(self, values):
qn = self.quote_name_unless_alias
set_sql = []
for idx, field in enumerate(values.field_list, 2):
for idx, field in enumerate(values.field_list, start=2):
name = field.column
set_sql.append(
"%s = %s.%s" % (qn(name), qn("subquery"), qn(f"column{idx}"))