kopia lustrzana https://github.com/wagtail/wagtail
Fixed the copy function to look in the right place for a parent_link
Currently, if you try to copy a Page while using a OneToOneField of any kind, it will fail.pull/2266/merge
rodzic
a1a2940495
commit
764b6e3e9b
|
@ -1079,7 +1079,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
|||
continue
|
||||
|
||||
# Ignore parent links (page_ptr)
|
||||
if isinstance(field, models.OneToOneField) and field.parent_link:
|
||||
if isinstance(field, models.OneToOneField) and field.rel.parent_link:
|
||||
continue
|
||||
|
||||
specific_dict[field.name] = getattr(specific_self, field.name)
|
||||
|
|
Ładowanie…
Reference in New Issue