0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

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

Thanks Thomas Tanner for the report.
This commit is contained in:
Claude Paroz 2015-02-28 10:12:32 +01:00
parent 3cf1c02695
commit 9f1dbe29c0

View File

@ -46,6 +46,10 @@ class Command(BaseCommand):
sql_list = sql_flush(self.style, connection, only_django=True,
reset_sequences=reset_sequences,
allow_cascade=allow_cascade)
if not sql_list:
raise CommandError(
"No commands to proceed with, maybe the database is still empty?"
)
if interactive:
confirm = input("""You have requested a flush of the database.