diff options
| author | Tim Graham <timograham@gmail.com> | 2017-10-03 10:32:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-03 10:32:11 -0400 |
| commit | 51d230e00b9d10378ccd9259e577e92317c82d75 (patch) | |
| tree | 248d31f98b3066bbba95c58456ef156b258ae8f1 | |
| parent | 491eb56fd4dea10248ccced90c31ed64152d09cb (diff) | |
Fixed #28675 -- Removed always True variable in SQLInsertCompiler.execute_sql() check.
Unused since 7deb25b8dd5aa1ed02b5e30cbc67cd1fb0c3d6e6.
| -rw-r--r-- | django/db/models/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index b23404f21d..6e1c2a9aaa 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -1262,7 +1262,7 @@ class SQLInsertCompiler(SQLCompiler): with self.connection.cursor() as cursor: for sql, params in self.as_sql(): cursor.execute(sql, params) - if not (return_id and cursor): + if not return_id: return if self.connection.features.can_return_ids_from_bulk_insert and len(self.query.objs) > 1: return self.connection.ops.fetch_returned_insert_ids(cursor) |
