diff --git a/person.py b/person.py index b1662e443..ff80678df 100644 --- a/person.py +++ b/person.py @@ -619,7 +619,7 @@ def personUpgradeActor(baseDir: str, personJson: {}, { '@type': 'Occupation', 'name': occupationName, - 'location': { + 'occupationLocation': { '@type': 'VirtualLocation', 'url': personDomain }, @@ -633,9 +633,12 @@ def personUpgradeActor(baseDir: str, personJson: {}, ocItem = personJson['hasOccupation'][index] if ocItem.get('hasOccupation'): ocItem = ocItem['hasOccupation'] - if not ocItem.get('location'): + if ocItem.get('location'): + del ocItem['location'] + updateActor = True + if not ocItem.get('occupationLocation'): personDomain = personJson['id'].split('/users/')[0] - ocItem['location'] = { + ocItem['occupationLocation'] = { "@type": "VirtualLocation", "url": personDomain } diff --git a/roles.py b/roles.py index 76ea529d0..f149a36df 100644 --- a/roles.py +++ b/roles.py @@ -146,9 +146,9 @@ def _setActorRole(actorJson: {}, roleName: str) -> bool: "hasOccupation": { "@type": "Occupation", "name": roleName, - 'location': { - '@type': 'VirtualLocation', - 'url': actorDomain + "occupationLocation": { + "@type": "VirtualLocation", + "url": actorDomain }, "occupationalCategory": { "@type": "CategoryCode",