summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-07-31 07:53:55 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-07-31 07:53:55 +0000
commit7a87f5aeaba09fb96d7f3c5dfd620fd2cd7989de (patch)
treef292c907c6d640349d7c4e013466664ddf9c1f83
parent004ff03a8eec02c9656544bb9881d6edaeda961c (diff)
Fixed #8053 -- Corrected a bug with reset and m2m intermediate tables. Thanks to d00gs for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/sql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/sql.py b/django/core/management/sql.py
index bd6a804b32..7c17807130 100644
--- a/django/core/management/sql.py
+++ b/django/core/management/sql.py
@@ -181,7 +181,7 @@ def sql_delete(app, style):
for model in app_models:
opts = model._meta
for f in opts.local_many_to_many:
- if isinstance(f.rel, generic.GenericRel):
+ if not f.creates_table:
continue
if cursor and table_name_converter(f.m2m_db_table()) in table_names:
output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),