1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #21549 -- Made loaddata's 'fixture not found' warning an exception.

Thanks to mpasternak for the report and Tim Graham for the review.
This commit is contained in:
Andrew Kuchev
2016-01-03 00:11:18 +05:00
committed by Tim Graham
parent 2c6c873e3f
commit d5b90c8e12
4 changed files with 18 additions and 30 deletions

View File

@@ -239,8 +239,7 @@ class Command(BaseCommand):
fixture_files.extend(fixture_files_in_dir)
if not fixture_files:
# Warning kept for backwards-compatibility; why not an exception?
warnings.warn("No fixture named '%s' found." % fixture_name)
raise CommandError("No fixture named '%s' found." % fixture_name)
return fixture_files