Symmetry is lost when inheriting a self-referential m2m field
|Reported by:||Justin Lilly||Owned by:||Justin Lilly|
|Component:||Database layer (models, ORM)||Version:||1.0|
|Severity:||Keywords:||mti, m2m, inheritance|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When extending a model (via MTI, not ABC), the implicit symmetrical=True reference wasn't being maintained because the current class was being checked against the parent (which weren't the same type). By changing this to an isinstance call instead of a __class__ comparison, it properly compares to parent objects.