Skip to content

Commit

Permalink
Skip get_prep_value() overrides in Wagtail 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Babic committed Dec 22, 2024
1 parent 4602975 commit f7578cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlstreamfield/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_prep_value(self, value):
block definitions are unavailable during migrations, which causes
empty values to be written back to the database on save.
"""
if not self.stream_block.child_blocks and isinstance(value, StreamValue):
if wagtail_version > "6.0" and not self.stream_block.child_blocks and isinstance(value, StreamValue):
if value.raw_text:
return value.raw_text
if value._raw_data:
Expand Down

0 comments on commit f7578cc

Please sign in to comment.