mirror of
https://github.com/django/django.git
synced 2024-12-26 19:16:11 +00:00
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
This commit is contained in:
parent
004ff03a8e
commit
7a87f5aeab
@ -181,7 +181,7 @@ def sql_delete(app, style):
|
|||||||
for model in app_models:
|
for model in app_models:
|
||||||
opts = model._meta
|
opts = model._meta
|
||||||
for f in opts.local_many_to_many:
|
for f in opts.local_many_to_many:
|
||||||
if isinstance(f.rel, generic.GenericRel):
|
if not f.creates_table:
|
||||||
continue
|
continue
|
||||||
if cursor and table_name_converter(f.m2m_db_table()) in table_names:
|
if cursor and table_name_converter(f.m2m_db_table()) in table_names:
|
||||||
output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),
|
output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),
|
||||||
|
Loading…
Reference in New Issue
Block a user