From 4613fa25620b2fc03a69f28c62154e20805f3e11 Mon Sep 17 00:00:00 2001 From: Jeremy Thompson Date: Thu, 7 Apr 2022 15:09:48 -0400 Subject: [PATCH] Fix RichTextField to StreamField example migration --- CONTRIBUTORS.rst | 1 + docs/topics/streamfield.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f9ddad407c..178c256cc2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -672,6 +672,7 @@ Contributors * Benita Anawonah * Anisha Singh * Ivy Jeptoo +* Jeremy Thompson Translators =========== diff --git a/docs/topics/streamfield.md b/docs/topics/streamfield.md index 64da3d3c8a..2c879201ca 100644 --- a/docs/topics/streamfield.md +++ b/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