summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2014-07-27 13:23:16 +0200
committerFlorian Apolloner <florian@apolloner.eu>2014-07-27 13:23:16 +0200
commit2ab0ed7b2842fbb8bf36ee7df9949d10546d953d (patch)
treea9dbe51466be7e4a95c22d8a6e544d4a772a40de
parent11181a64f947236402903deb6fa8c4df7b8bff75 (diff)
Only warn about initial data if fixtures have been found.
-rw-r--r--django/core/management/commands/loaddata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 0c739999b2..9cd5a232fd 100644
--- a/django/core/management/commands/loaddata.py
+++ b/django/core/management/commands/loaddata.py
@@ -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