diff --git a/server/books/schema/mutations/utils.py b/server/books/schema/mutations/utils.py index b6fc0f1b..26d0df40 100644 --- a/server/books/schema/mutations/utils.py +++ b/server/books/schema/mutations/utils.py @@ -144,15 +144,16 @@ def handle_content_block(content, context=None, module=None, allowed_blocks=ALLO } } elif content['type'] == 'content_list_item': - if content.get('id') is not None: # the list block existed already + if content.get('id') is not None: # the list block existed already 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['value'] = value - return content + return {'type': 'content_list_item', + 'value': value, + 'id': content.get('id')} elif content['type'] == 'readonly' and previous_contents is not None: # get first item that matches the id # users can re-order readonly items, but we won't let them change them otherwise, so we just take the