Fixes following external fedireads user

Fixes #42
This commit is contained in:
Mouse Reeve
2020-02-19 11:33:00 -08:00
parent bf58e29a54
commit f7867da7a0
7 changed files with 29 additions and 30 deletions

View File

@ -66,7 +66,10 @@ def handle_account_search(query):
data = response.json()
for link in data['links']:
if link['rel'] == 'self':
user = get_or_create_remote_user(link['href'])
try:
user = get_or_create_remote_user(link['href'])
except KeyError:
return HttpResponseNotFound()
return user