Ticket #294 (closed defect: fixed)
Acessing ManyToMany field pulls the wrong relationship
|Reported by:||hcarvalhoalves@…||Owned by:||andrew|
During the migration, accessing a ManyToMany? manager brings the wrong instances. E.g., given the 2 models:
class Client(models.Model): ... class Property(models.Model): owner = models.ForeignKey(Client, null=True) interested = models.ManyToManyField(Client, related_name='interests')
If during the migration, I try to access the relationship:
for property in orm['property.Property'].objects.all(): clients = property.interested.all()
clients contains the equivalent of calling property.owner, instead of the expected M2M relationships.