Show occupation name

merge-requests/30/head
Bob Mottram 2021-05-13 12:35:36 +01:00
parent 62d9000671
commit ccd02acfeb
1 changed files with 6 additions and 4 deletions

View File

@ -740,8 +740,9 @@ def htmlProfile(rssIconAtTop: bool,
if 'T' in profileJson['published']: if 'T' in profileJson['published']:
joinedDate = profileJson['published'] joinedDate = profileJson['published']
occupationName = None occupationName = None
if profileJson.get('occupationName'): if profileJson.get('hasOccupation'):
occupationName = profileJson['occupationName'] if profileJson['hasOccupation'].get('name'):
occupationName = profileJson['hasOccupation']['name']
avatarUrl = profileJson['icon']['url'] avatarUrl = profileJson['icon']['url']
@ -1601,8 +1602,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
editProfileForm += ' accept="' + imageFormats + '">\n' editProfileForm += ' accept="' + imageFormats + '">\n'
occupationName = '' occupationName = ''
if actorJson.get('occupationName'): if actorJson.get('hasOccupation'):
occupationName = actorJson['occupationName'] if actorJson['hasOccupation'].get('name'):
occupationName = actorJson['hasOccupation']['name']
editProfileForm += '<label class="labels">' + \ editProfileForm += '<label class="labels">' + \
translate['Occupation'] + ':</label><br>\n' translate['Occupation'] + ':</label><br>\n'