mirror of https://gitlab.com/bashrc2/epicyon
Check that attachment is a dict
parent
e19d5c1b56
commit
3024ffaa9f
2
utils.py
2
utils.py
|
@ -389,6 +389,8 @@ def get_media_descriptions_from_post(post_json_object: {}) -> str:
|
||||||
return ''
|
return ''
|
||||||
descriptions = ''
|
descriptions = ''
|
||||||
for attach in this_post_json['attachment']:
|
for attach in this_post_json['attachment']:
|
||||||
|
if not isinstance(attach, dict):
|
||||||
|
continue
|
||||||
if not attach.get('name'):
|
if not attach.get('name'):
|
||||||
continue
|
continue
|
||||||
descriptions += attach['name'] + ' '
|
descriptions += attach['name'] + ' '
|
||||||
|
|
Loading…
Reference in New Issue