fix for #295
This commit is contained in:
@ -275,5 +275,9 @@ class ManyToManyField(ForeignKeyField, ormar.QuerySetProtocol, ormar.RelationPro
|
|||||||
"metadata": self.owner.Meta.metadata,
|
"metadata": self.owner.Meta.metadata,
|
||||||
}
|
}
|
||||||
new_meta = type("Meta", (), new_meta_namespace)
|
new_meta = type("Meta", (), new_meta_namespace)
|
||||||
through_model = type(class_name, (ormar.Model,), {"Meta": new_meta})
|
through_model = type(
|
||||||
|
class_name,
|
||||||
|
(ormar.Model,),
|
||||||
|
{"Meta": new_meta, "id": ormar.Integer(name="id", primary_key=True)},
|
||||||
|
)
|
||||||
self.through = cast(Type["Model"], through_model)
|
self.through = cast(Type["Model"], through_model)
|
||||||
|
|||||||
Reference in New Issue
Block a user