Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed #14226 -- dependency calculation for complex M2M relations #1495

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

koirikivi commented Aug 21, 2013

See https://code.djangoproject.com/ticket/14226#comment:13 for details

I also refactored sort_depencies a tiny bit to make it more readable. I made a separate commit for this, since it shouldn't change behaviour and I'd rather keep that explicit. The commits can of course be squashed if that's preferred.

All tests pass under sqlite and postgres.

koirikivi added some commits Aug 21, 2013

Fixed #14226 -- dependency calculation for complex M2M relations
`sort_dependencies` incorrectly interpreted M2M relations with
explicit through models as dependencies for a model.  This caused
circular complex M2M relations to be unserializable by dumpdata.
Added a check to see if a relation is has an explicit through model and
only adding the dependency if it doesn't.

Also added lots of tests to fixtures_regress to test dependency sorting
and (de)serialization of models with various different M2M relations.

Thanks to aneil for the report and outofculture for initial tests.
Member

ramiro commented May 11, 2014

Merged in a75324c.

Thanks a lot for your work on this.

@ramiro ramiro closed this May 11, 2014

@koirikivi koirikivi deleted the koirikivi:ticket_14226 branch May 12, 2014

@koirikivi koirikivi restored the koirikivi:ticket_14226 branch May 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment