aerich
aerich copied to clipboard
Model with multiple FKs to same table throws error or finds changes that aren't there
In aerich/migrate.py line 244 the list of dicts being diff'd aren't ordered so there are cases when the diff is finding changes only due to ordering.
Monkey Patch to fix:
`import operator
old_m2m_fields = sorted(old_m2m_fields, key=operator.itemgetter('name')) new_m2m_fields = sorted(new_m2m_fields, key=operator.itemgetter('name'))`