Fix bug get bookmarks
This commit is contained in:
parent
1ae8de894b
commit
861db768cd
|
|
@ -50,6 +50,7 @@ def find_content(content_list, bookmark):
|
||||||
if content['type'] in ['text_block', 'subtitle', 'solution']:
|
if content['type'] in ['text_block', 'subtitle', 'solution']:
|
||||||
return content['value'].get('text', '')
|
return content['value'].get('text', '')
|
||||||
if content['type'] in ['basic_knowledge']:
|
if content['type'] in ['basic_knowledge']:
|
||||||
|
if type(content['value']) is dict:
|
||||||
description = content['value'].get('description', '')
|
description = content['value'].get('description', '')
|
||||||
if not description:
|
if not description:
|
||||||
try:
|
try:
|
||||||
|
|
@ -58,8 +59,8 @@ def find_content(content_list, bookmark):
|
||||||
return ''
|
return ''
|
||||||
else:
|
else:
|
||||||
return description
|
return description
|
||||||
print(bookmark.uuid)
|
else:
|
||||||
print(json.dumps(content_dict, indent=4))
|
logger.warn(f"Content value is not a dict: {content['value']}")
|
||||||
return content_dict.get(content['type'], '')
|
return content_dict.get(content['type'], '')
|
||||||
|
|
||||||
class NoteNode(DjangoObjectType):
|
class NoteNode(DjangoObjectType):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue