mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 09:13:14 +00:00
New ListBlocks should consist of one empty item by default
This commit is contained in:
parent
4603701a59
commit
194535120a
1 changed files with 2 additions and 1 deletions
|
|
@ -541,7 +541,8 @@ class StructBlock(six.with_metaclass(DeclarativeSubBlocksMetaclass, BaseStructBl
|
|||
|
||||
class ListBlock(Block):
|
||||
class Meta:
|
||||
default = []
|
||||
# Default to a list consisting of one empty child item (using None to trigger the child's empty / default rendering)
|
||||
default = [None]
|
||||
|
||||
def __init__(self, child_block, **kwargs):
|
||||
super(ListBlock, self).__init__(**kwargs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue