1
0
mirror of https://github.com/django/django.git synced 2025-02-08 08:26:13 +00:00

Fixes #7845: Removed a piece of stale code that was causing ./manage.py reset to fail with apps that don't have any models. Thanks to miracle2k for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2008-08-16 04:11:38 +00:00
parent fc2c03b55c
commit 0345fec71b

View File

@ -104,8 +104,6 @@ def sql_delete(app, style):
if cursor and connection.introspection.table_name_converter(f.m2m_db_table()) in table_names: if cursor and connection.introspection.table_name_converter(f.m2m_db_table()) in table_names:
output.extend(connection.creation.sql_destroy_many_to_many(model, f, style)) output.extend(connection.creation.sql_destroy_many_to_many(model, f, style))
app_label = app_models[0]._meta.app_label
# Close database connection explicitly, in case this output is being piped # Close database connection explicitly, in case this output is being piped
# directly into a database client, to avoid locking issues. # directly into a database client, to avoid locking issues.
if cursor: if cursor: