From 4bbee825e606824800d5edb862c13488c896a74e Mon Sep 17 00:00:00 2001 From: Paul Seidel Date: Wed, 3 Jun 2015 14:42:21 +0200 Subject: [PATCH] Find tables of many-to-many relationships --- django_nose/fixture_tables.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django_nose/fixture_tables.py b/django_nose/fixture_tables.py index 7865e90..968203d 100644 --- a/django_nose/fixture_tables.py +++ b/django_nose/fixture_tables.py @@ -125,6 +125,8 @@ def read(self): loaded_objects_in_fixture += 1 tables.add( obj.object.__class__._meta.db_table) + for m2m in obj.object.__class__._meta.many_to_many: + tables.add(m2m.m2m_db_table()) loaded_object_count += loaded_objects_in_fixture fixture_object_count += objects_in_fixture label_found = True