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:
committed by
Tim Graham
parent
2c6c873e3f
commit
d5b90c8e12
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user