mirror of
https://github.com/django/django.git
synced 2025-03-31 19:46:42 +00:00
Fixed #24369 -- Prevented crash when flushing before db migration
Thanks Thomas Tanner for the report and Tim Graham for the review.
This commit is contained in:
parent
39a7eed1bb
commit
767c33d1fa
@ -75,7 +75,8 @@ Are you sure you want to do this?
|
|||||||
"The full error: %s") % (connection.settings_dict['NAME'], e)
|
"The full error: %s") % (connection.settings_dict['NAME'], e)
|
||||||
six.reraise(CommandError, CommandError(new_msg), sys.exc_info()[2])
|
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
|
# Emit the post migrate signal. This allows individual applications to
|
||||||
# respond as if the database had been migrated from scratch.
|
# respond as if the database had been migrated from scratch.
|
||||||
emit_post_migrate_signal(verbosity, interactive, database)
|
emit_post_migrate_signal(verbosity, interactive, database)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user