diff --git a/webapp_utils.py b/webapp_utils.py index 62b6c1382..e7c80309b 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -841,7 +841,9 @@ def html_header_with_person_markup(css_filename: str, instance_title: str, first_entry = False skills_markup += '\n ],\n' - description = remove_html(actor_json['summary']) + description = '' + if actor_json.get('summary'): + description = remove_html(actor_json['summary']) name_str = remove_html(actor_json['name']) domain_full = actor_json['id'].split('://')[1].split('/')[0] handle = actor_json['preferredUsername'] + '@' + domain_full diff --git a/webapp_welcome_profile.py b/webapp_welcome_profile.py index ff6ea2cd0..531eef1bc 100644 --- a/webapp_welcome_profile.py +++ b/webapp_welcome_profile.py @@ -112,8 +112,10 @@ def html_welcome_profile(base_dir: str, nickname: str, domain: str, edit_text_field(translate['Nickname'], 'displayNickname', display_nickname) - bio_str = \ - actor_json['summary'].replace('
', '').replace('
', '') + bio_str = '' + if actor_json.get('summary'): + bio_str = \ + actor_json['summary'].replace('', '').replace('
', '') if not bio_str: bio_str = translate['Your bio'] profile_form += '