Browse files

[1.7.x] Only warn about initial data if fixtures have been found.

Backport of 2ab0ed7 from master.
  • Loading branch information...
apollo13 committed Jul 27, 2014
1 parent df0d5ea commit f8ec200671649282b9e62fb1a4dfc138fa4eb4fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/core/management/commands/
@@ -224,7 +224,7 @@ def find_fixtures(self, fixture_label):
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:
'initial_data fixtures are deprecated. Use data migrations instead.',

0 comments on commit f8ec200

Please sign in to comment.