Check for dict

main
Bob Mottram 2024-03-13 20:03:27 +00:00
parent 24099d5025
commit 60b50bf7ff
1 changed files with 4 additions and 3 deletions

View File

@ -411,9 +411,10 @@ def get_person_box(signing_priv_key_pem: str, origin_domain: str,
shared_inbox = person_json['endpoints']['sharedInbox']
avatar_url = None
if person_json.get('icon'):
if person_json['icon'].get('url'):
url_str = get_url_from_post(person_json['icon']['url'])
avatar_url = remove_html(url_str)
if isinstance(person_json['icon'], dict):
if person_json['icon'].get('url'):
url_str = get_url_from_post(person_json['icon']['url'])
avatar_url = remove_html(url_str)
display_name = None
possible_display_name = None
if person_json.get('name'):