diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 34f8041..9fd2e25 100644
a
|
b
|
class Command(BaseCommand):
|
199 | 199 | finally: |
200 | 200 | fixture.close() |
201 | 201 | |
202 | | # If the fixture we loaded contains 0 objects, assume that an |
203 | | # error was encountered during fixture loading. |
204 | | if objects_in_fixture == 0: |
205 | | raise CommandError( |
206 | | "No fixture data found for '%s'. (File format may be invalid.)" % |
207 | | (fixture_name)) |
208 | | |
209 | 202 | # Since we disabled constraint checks, we must manually check for |
210 | 203 | # any invalid keys that might have been added |
211 | 204 | table_names = [model._meta.db_table for model in models] |