diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-07-21 10:09:31 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-07-21 10:09:31 +0100 |
| commit | 2984b30ce84eccedfcc5b5241d12720913d0b80a (patch) | |
| tree | 0000ffd55720cb4ab9a3c38ce0cc0fed9b69c864 /django | |
| parent | 5875b8d13333bf709b54f91a143304826d57f2fd (diff) | |
Fixed #23039: Don't try to serialize unmanaged models in tests
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/creation.py | 2 |
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 |
