From 0345fec71bb8f9ff9ff460a63e5cc0640cc06a76 Mon Sep 17 00:00:00 2001
From: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat, 16 Aug 2008 04:11:38 +0000
Subject: [PATCH] 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
---
 django/core/management/sql.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/django/core/management/sql.py b/django/core/management/sql.py
index da63f7e640..4874a49dde 100644
--- a/django/core/management/sql.py
+++ b/django/core/management/sql.py
@@ -104,8 +104,6 @@ def sql_delete(app, style):
             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))
 
-    app_label = app_models[0]._meta.app_label
-
     # Close database connection explicitly, in case this output is being piped
     # directly into a database client, to avoid locking issues.
     if cursor: