diff options
| author | Aarni Koskela <akx@iki.fi> | 2025-03-05 18:45:10 +0200 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-03-31 22:43:13 -0300 |
| commit | c972af69e2021b75b89d8bc47e214ef875bbdc06 (patch) | |
| tree | 7a454faf8b3e4fadd1a92ac37b9d1df19a5e3fcb /django/db/models/sql/compiler.py | |
| parent | 6888375c53476011754f778deabc6cdbfa327011 (diff) | |
Refs #28909 -- Simplified code using unpacking generalizations.
Diffstat (limited to 'django/db/models/sql/compiler.py')
| -rw-r--r-- | django/db/models/sql/compiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 72e7293e57..56a759b1bd 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -1452,7 +1452,7 @@ class SQLCompiler: field = klass_info["field"] if klass_info["reverse"]: field = field.remote_field - path = parent_path + [field.name] + path = [*parent_path, field.name] yield LOOKUP_SEP.join(path) queue.extend( (path, klass_info) @@ -1905,7 +1905,7 @@ class SQLInsertCompiler(SQLCompiler): if on_conflict_suffix_sql: result.append(on_conflict_suffix_sql) return [ - (" ".join(result + ["VALUES (%s)" % ", ".join(p)]), vals) + (" ".join([*result, "VALUES (%s)" % ", ".join(p)]), vals) for p, vals in zip(placeholder_rows, param_rows) ] |
