Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 7a87f5aeaba09fb96d7f3c5dfd620fd2cd7989de 1 parent 004ff03
Russell Keith-Magee authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/management/sql.py
2  django/core/management/sql.py
@@ -181,7 +181,7 @@ def sql_delete(app, style):
181 181
     for model in app_models:
182 182
         opts = model._meta
183 183
         for f in opts.local_many_to_many:
184  
-            if isinstance(f.rel, generic.GenericRel):
  184
+            if not f.creates_table:
185 185
                 continue
186 186
             if cursor and table_name_converter(f.m2m_db_table()) in table_names:
187 187
                 output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),

0 notes on commit 7a87f5a

Please sign in to comment.
Something went wrong with that request. Please try again.