fix mypy
This commit is contained in:
@ -362,10 +362,8 @@ def copy_data_from_parent_model( # noqa: CCR001
|
|||||||
copy_field.related_name = related_name
|
copy_field.related_name = related_name
|
||||||
|
|
||||||
through_class = field.through
|
through_class = field.through
|
||||||
new_meta: ormar.ModelMeta = type(
|
new_meta: ormar.ModelMeta = type( # type: ignore
|
||||||
"Meta",
|
"Meta", (), dict(through_class.Meta.__dict__),
|
||||||
(), # type: ignore
|
|
||||||
dict(through_class.Meta.__dict__),
|
|
||||||
)
|
)
|
||||||
new_meta.tablename += "_" + meta.tablename
|
new_meta.tablename += "_" + meta.tablename
|
||||||
# create new table with copied columns but remove foreign keys
|
# create new table with copied columns but remove foreign keys
|
||||||
|
|||||||
Reference in New Issue
Block a user