We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c237cb commit 9383a37Copy full SHA for 9383a37
django/core/management/commands/flush.py
@@ -66,12 +66,12 @@ def handle_noargs(self, **options):
66
# Emit the post sync signal. This allows individual
67
# applications to respond as if the database had been
68
# sync'd from scratch.
69
- all_models = [
70
- (app.__name__.split('.')[-2],
71
- [m for m in models.get_models(app, include_auto_created=True)
72
- if router.allow_syncdb(db, m)])
73
- for app in models.get_apps()
74
- ]
+ all_models = []
+ for app in models.get_apps():
+ all_models.extend([
+ m for m in models.get_models(app, include_auto_created=True)
+ if router.allow_syncdb(db, m)
+ ])
75
emit_post_sync_signal(all_models, verbosity, interactive, db)
76
77
# Reinstall the initial_data fixture.
0 commit comments