Fix bug preventing users of adding new list blocks
This commit is contained in:
parent
44ba6715fd
commit
043f895810
|
|
@ -144,8 +144,12 @@ def handle_content_block(content, context=None, module=None, allowed_blocks=ALLO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elif content['type'] == 'content_list_item':
|
elif content['type'] == 'content_list_item':
|
||||||
previous_item = get_previous_item(previous_contents=previous_contents, item=content)
|
if content.get('id') is not None: # the list block existed already
|
||||||
value = [handle_content_block(c, context, module, previous_contents=previous_item['value']) for c in
|
previous_item = get_previous_item(previous_contents=previous_contents, item=content)
|
||||||
|
previous_content = previous_item.get('value')
|
||||||
|
else:
|
||||||
|
previous_content = None
|
||||||
|
value = [handle_content_block(c, context, module, previous_contents=previous_content) for c in
|
||||||
content['contents']]
|
content['contents']]
|
||||||
content['value'] = value
|
content['value'] = value
|
||||||
return content
|
return content
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue