浏览代码

Fix RichTextField to StreamField example migration

Jeremy Thompson 3 年之前
父节点
当前提交
4613fa2562
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CONTRIBUTORS.rst
  2. 1 1
      docs/topics/streamfield.md

+ 1 - 0
CONTRIBUTORS.rst

@@ -672,6 +672,7 @@ Contributors
 * Benita Anawonah
 * Anisha Singh
 * Ivy Jeptoo
+* Jeremy Thompson
 
 Translators
 ===========

+ 1 - 1
docs/topics/streamfield.md

@@ -629,7 +629,7 @@ from wagtail.rich_text import RichText
 def page_to_streamfield(page):
     changed = False
     if page.body.raw_text and not page.body:
-        page.body = [('rich_text', {'rich_text': RichText(page.body.raw_text)})]
+        page.body = [('rich_text', RichText(page.body.raw_text))]
         changed = True
     return page, changed