From 5f5fd75f579f4db6036fc324c79344795e97dce6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 24 Feb 2022 11:17:32 +0000 Subject: [PATCH] Check that field exists --- webfinger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webfinger.py b/webfinger.py index 440d96b3e..0393c1140 100644 --- a/webfinger.py +++ b/webfinger.py @@ -316,8 +316,9 @@ def _webfinger_update_vcard(wf_json: {}, actor_json: {}) -> bool: """Updates the vcard link """ for link in wf_json['links']: - if link['type'] == 'text/vcard': - return False + if link.get('type'): + if link['type'] == 'text/vcard': + return False wf_json['links'].append({ "href": actor_json['url'], "rel": "http://webfinger.net/rel/profile-page",