Ticket #5066: reset_no_app_label.patch

File reset_no_app_label.patch, 685 bytes (added by gav@…, 17 years ago)

Patch against r5788 that resolves reset crash on apps with no models.

  • django/core/management.py

    diff -x .svn -x '*.pyc' -upr django_orig/django/core/management.py django_live/django/core/management.py
    old new def get_sql_delete(app):  
    366366                if hasattr(backend, 'get_drop_sequence'):
    367367                    output.append(backend.get_drop_sequence("%s_%s" % (model._meta.db_table, f.column)))
    368368
    369 
    370     app_label = app_models[0]._meta.app_label
    371 
    372369    # Close database connection explicitly, in case this output is being piped
    373370    # directly into a database client, to avoid locking issues.
    374371    if cursor:
Back to Top