Wagtail在页面更新中引发ValidationError [英] Wagtail raises ValidationError on page update

查看:50
本文介绍了Wagtail在页面更新中引发ValidationError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将更新发布到现有的Wagtail页面时,它会引发带有以下消息的ValidationError.

On publishing updates to an existing wagtail page it raises a ValidationError with the message below.

ValidationError({'live_revision':['id为33的页面修订实例不存在.']})

其他所有动作(例如起草,提交审核)都可以.仅发布具有新更新的页面会引发ValidationError,从而有效地限制了更新现有页面的能力.

All other actions such as drafting, submitting for moderation all work okay. Only publishing the page with new updates raises the ValidationError effectively limiting the ability to update existing pages.

推荐答案

刚刚遇到了一个非常相似的问题.

Just faced a very similar issue.

确保您没有在 Page 模型中使用 ParentalKey .改用常规的Django models.ForeignKey .

Make sure you are not using ParentalKey in a Page model. Use the regular Django models.ForeignKey instead.

这篇关于Wagtail在页面更新中引发ValidationError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆