diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index dca3069ef7..0000872eed 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -224,7 +224,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