Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #21151 -- Bad cleanup in schema M2M repoint test

  • Loading branch information...
commit 6ede1db331d59e9a89eaa65101629d0ff642f8fc 1 parent 16ceb05
@andrewgodwin andrewgodwin authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  tests/schema/tests.py
View
3  tests/schema/tests.py
@@ -307,6 +307,9 @@ def test_m2m_repoint(self):
else:
self.fail("No FK constraint for uniquetest_id found")
finally:
+ # Cleanup through table separately
+ with connection.schema_editor() as editor:
+ editor.remove_field(BookWithM2M, BookWithM2M._meta.get_field_by_name("uniques")[0])
# Cleanup model states
BookWithM2M._meta.local_many_to_many.remove(new_field)
del BookWithM2M._meta._m2m_cache
Please sign in to comment.
Something went wrong with that request. Please try again.