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:
@@ -80,6 +80,9 @@ class Product(Model):
|
||||
|
||||
|
||||
class Config(Model):
|
||||
categories: fields.ManyToManyRelation[Category] = fields.ManyToManyField(
|
||||
"models.Category", through="config_category_map", related_name="category_set"
|
||||
)
|
||||
label = fields.CharField(max_length=200)
|
||||
key = fields.CharField(max_length=20)
|
||||
value: dict = fields.JSONField()
|
||||
|
||||
Reference in New Issue
Block a user