mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 09:13:14 +00:00
treat empty string as an empty value on StreamField too
This commit is contained in:
parent
85902d111d
commit
bfefcf3bb1
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ class StreamField(with_metaclass(models.SubfieldBase, models.Field)):
|
|||
return name, path, args, kwargs
|
||||
|
||||
def to_python(self, value):
|
||||
if value is None:
|
||||
if value is None or value == '':
|
||||
return StreamValue(self.stream_block, [])
|
||||
elif isinstance(value, StreamValue):
|
||||
return value
|
||||
|
|
|
|||
Loading…
Reference in a new issue