diff --git a/utils.py b/utils.py index 9814f6fbb..295d87c0f 100644 --- a/utils.py +++ b/utils.py @@ -389,6 +389,8 @@ def get_media_descriptions_from_post(post_json_object: {}) -> str: return '' descriptions = '' for attach in this_post_json['attachment']: + if not isinstance(attach, dict): + continue if not attach.get('name'): continue descriptions += attach['name'] + ' '