Ticket #18213: ticket18213.diff

File ticket18213.diff, 1.0 KB (added by Renato Oliveira, 12 years ago)

I just removed the test. But, if the best way is to create a setting to disable it whenever you want, how would it be?

  • django/core/management/commands/loaddata.py

    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):  
    199199                                finally:
    200200                                    fixture.close()
    201201
    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 
    209202            # Since we disabled constraint checks, we must manually check for
    210203            # any invalid keys that might have been added
    211204            table_names = [model._meta.db_table for model in models]
Back to Top