Skip to content

Commit

Permalink
Fixed #24369 -- Prevented crash when flushing before db migration
Browse files Browse the repository at this point in the history
Thanks Thomas Tanner for the report and Tim Graham for the review.
  • Loading branch information
claudep committed Mar 5, 2015
1 parent 39a7eed commit 767c33d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/core/management/commands/flush.py
Expand Up @@ -75,7 +75,8 @@ def handle(self, **options):
"The full error: %s") % (connection.settings_dict['NAME'], e)
six.reraise(CommandError, CommandError(new_msg), sys.exc_info()[2])

if not inhibit_post_migrate:
# Empty sql_list may signify an empty database and post_migrate would then crash
if sql_list and not inhibit_post_migrate:
# Emit the post migrate signal. This allows individual applications to
# respond as if the database had been migrated from scratch.
emit_post_migrate_signal(verbosity, interactive, database)
Expand Down

0 comments on commit 767c33d

Please sign in to comment.