[Answered ]-Many-to-many fields with intermediate tables must not be symmetrical

2👍

The error is pretty clear you can’t have M2M relation with intermediate table and symmetrical=True, it must be symmetrical=False.

So try with:

rides = models.ManyToManyField('self', through='Ride', symmetrical=False)

However, I think something is wrong with your model structure, you have two M2M fields pointing to self? I’m not sure whats the purpose of the Rides model, but maybe this model should only have FKs to city.

👤Todor

Leave a comment