fix: migrate drop the wrong m2m field when model have multi m2m fields (#390)
* fix: migrate drop the wrong m2m field when model have multi m2m fields * Make style and update changelog * refactor: return new lists instead of change argument values in function * refactor: use custom diff function instead of reorder lists * docs: fix typo * Fix hardcoded and rename custom diff function * Update function doc
This commit is contained in:
@@ -65,6 +65,10 @@ class Product(Model):
|
||||
|
||||
|
||||
class Config(Model):
|
||||
category: fields.ManyToManyRelation[Category] = fields.ManyToManyField("models.Category")
|
||||
categories: fields.ManyToManyRelation[Category] = fields.ManyToManyField(
|
||||
"models.Category", through="config_category_map", related_name="config_set"
|
||||
)
|
||||
name = fields.CharField(max_length=100, unique=True)
|
||||
label = fields.CharField(max_length=200)
|
||||
key = fields.CharField(max_length=20)
|
||||
|
||||
Reference in New Issue
Block a user