mirror of
https://github.com/django/django.git
synced 2025-09-28 13:04:54 +00:00
Only warn about initial data if fixtures have been found.
This commit is contained in:
parent
11181a64f9
commit
2ab0ed7b28
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ class Command(BaseCommand):
|
|||
if fixture_name != 'initial_data' and not fixture_files:
|
||||
# Warning kept for backwards-compatibility; why not an exception?
|
||||
warnings.warn("No fixture named '%s' found." % fixture_name)
|
||||
elif fixture_name == 'initial_data':
|
||||
elif fixture_name == 'initial_data' and fixture_files:
|
||||
warnings.warn(
|
||||
'initial_data fixtures are deprecated. Use data migrations instead.',
|
||||
RemovedInDjango19Warning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue