kopia lustrzana https://github.com/wagtail/wagtail
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 itpull/1173/merge
rodzic
536c09f81f
commit
ee2f5530cf
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue