From bbc73e6a12227f5ed52fd38bc37f56f434a0a72c Mon Sep 17 00:00:00 2001 From: Roger Hu Date: Fri, 6 Dec 2013 01:14:57 +0000 Subject: Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject. --- django/db/models/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/db/models/query.py b/django/db/models/query.py index 58180e1cf9..3226f38753 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -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): -- cgit v1.3