Return description for basic knowlege bookmark

This commit is contained in:
Lorenz Padberg 2024-04-05 11:14:04 +02:00
parent 40703c3681
commit b78cb42b52
1 changed files with 3 additions and 1 deletions

View File

@ -40,8 +40,10 @@ def find_content(content_list, bookmark):
content = next(found, None) content = next(found, None)
if content is None: if content is None:
return '' return ''
if content['type'] in ['text_block', 'subtitle', 'solution', 'basic_knowledge']: if content['type'] in ['text_block', 'subtitle', 'solution']:
return content['value'].get('text', '') return content['value'].get('text', '')
if content['type'] in ['basic_knowledge']:
return content['value'].get('description', '')
return content_dict.get(content['type'], '') return content_dict.get(content['type'], '')
class NoteNode(DjangoObjectType): class NoteNode(DjangoObjectType):