1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

More schema test fixing

This commit is contained in:
Andrew Godwin
2012-09-17 21:16:36 +01:00
parent 9313dea700
commit d0b3536964
3 changed files with 63 additions and 52 deletions

View File

@@ -71,9 +71,11 @@ class Command(NoArgsCommand):
def model_installed(model):
opts = model._meta
converter = connection.introspection.table_name_converter
return not ((converter(opts.db_table) in tables) or
# Note that if a model is unmanaged we short-circuit and never try to install it
return opts.managed and not ((converter(opts.db_table) in tables) or
(opts.auto_created and converter(opts.auto_created._meta.db_table) in tables))
manifest = SortedDict(
(app_name, list(filter(model_installed, model_list)))
for app_name, model_list in all_models