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
Liam Brenner 2016-02-22 12:49:41 +11:00 zatwierdzone przez Tim Heap
rodzic a1a2940495
commit 764b6e3e9b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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)