kopia lustrzana https://github.com/wagtail/wagtail
Skip M2M relations in the field list when copying pages - fixes #1852
rodzic
865ee4aab0
commit
cd168a2b41
|
@ -739,6 +739,11 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
|||
if field.auto_created:
|
||||
continue
|
||||
|
||||
# Ignore m2m relations - they will be copied as child objects
|
||||
# if modelcluster supports them at all (as it does for tags)
|
||||
if field.many_to_many:
|
||||
continue
|
||||
|
||||
# Ignore parent links (page_ptr)
|
||||
if isinstance(field, models.OneToOneField) and field.parent_link:
|
||||
continue
|
||||
|
|
Ładowanie…
Reference in New Issue