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