Commit 767c33d1 authored by Claude Paroz's avatar Claude Paroz
Browse files

Fixed #24369 -- Prevented crash when flushing before db migration

Thanks Thomas Tanner for the report and Tim Graham for the review.
parent 39a7eed1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@ Are you sure you want to do this?
                    "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)