summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-07-21 10:09:31 +0100
committerAndrew Godwin <andrew@aeracode.org>2014-07-21 10:09:31 +0100
commit2984b30ce84eccedfcc5b5241d12720913d0b80a (patch)
tree0000ffd55720cb4ab9a3c38ce0cc0fed9b69c864 /django
parent5875b8d13333bf709b54f91a143304826d57f2fd (diff)
Fixed #23039: Don't try to serialize unmanaged models in tests
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/creation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
index e8308c9a91..4e6c1e52c6 100644
--- a/django/db/backends/creation.py
+++ b/django/db/backends/creation.py
@@ -424,7 +424,7 @@ class BaseDatabaseCreation(object):
# Make a function to iteratively return every object
def get_objects():
for model in sort_dependencies(app_list):
- if not model._meta.proxy and router.allow_migrate(self.connection.alias, model):
+ if not model._meta.proxy and model._meta.managed and router.allow_migrate(self.connection.alias, model):
queryset = model._default_manager.using(self.connection.alias).order_by(model._meta.pk.name)
for obj in queryset.iterator():
yield obj