mirror of
https://github.com/django/django.git
synced 2025-08-23 03:54:35 +00:00
Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject.
This commit is contained in:
parent
38e24d680d
commit
bbc73e6a12
2 changed files with 8 additions and 2 deletions
|
@ -389,7 +389,7 @@ class QuerySet(object):
|
|||
return objs
|
||||
self._for_write = True
|
||||
connection = connections[self.db]
|
||||
fields = self.model._meta.local_fields
|
||||
fields = self.model._meta.local_concrete_fields
|
||||
with transaction.commit_on_success_unless_managed(using=self.db):
|
||||
if (connection.features.can_combine_inserts_with_and_without_auto_increment_pk
|
||||
and self.model._meta.has_auto_field):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue