Set pk of page in PageRevision.as_page_object

Otherwise, Django sees it as unsaved and doesn't allow any foreign keys to point to it
pull/1173/merge
Karl Hobley 2015-03-16 23:14:14 +00:00 zatwierdzone przez Matthew Westcott
rodzic 536c09f81f
commit ee2f5530cf
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -1085,6 +1085,7 @@ class PageRevision(models.Model):
# Override the possibly-outdated tree parameter fields from this revision object
# with up-to-date values
obj.pk = self.page.pk
obj.path = self.page.path
obj.depth = self.page.depth
obj.numchild = self.page.numchild