Explorar o código

Fix RichTextField to StreamField example migration

Jeremy Thompson %!s(int64=3) %!d(string=hai) anos
pai
achega
4613fa2562
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  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