From bdfd1c103048ddc7d8e3bc02cac0c212d8c4c1e9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 28 Jun 2020 10:40:59 +0100 Subject: [PATCH] Handle cases with no avatar image --- webinterface.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webinterface.py b/webinterface.py index dc2800be4..ec8ff6280 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6074,7 +6074,7 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int, if len(profileDescriptionShort) > 256: profileDescriptionShort = '' # remove formatting from profile description used on title - avatarDescription = ' ' + avatarDescription = '' if profileJson.get('summary'): if isinstance(profileJson['summary'], str): avatarDescription = profileJson['summary'].replace('
', '\n') @@ -6082,11 +6082,11 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int, avatarDescription = avatarDescription.replace('

', '') profileStr = '
' profileStr += '
' - print('avatarDescription: ' + str(avatarDescription)) - profileStr += \ - ' ' + avatarDescription + '' + if avatarUrl: + profileStr += \ + ' ' + avatarDescription + '' profileStr += '

' + displayName + '

' profileStr += '

@' + searchNickname + '@' + \ searchDomainFull + '

'