From 71042a608c1e7100197ab3424b1002d1685dc186 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Apr 2022 05:25:29 -0400 Subject: [PATCH] minor fix --- mastodon/api.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon/api.py b/mastodon/api.py index 4e753012..905a8f8c 100644 --- a/mastodon/api.py +++ b/mastodon/api.py @@ -141,7 +141,7 @@ def get_site_id(username, user_site, target_site, token): } response = get(url, params=payload, headers=headers) data = response.json() - if not data['accounts']: + if 'accounts' not in data: return None elif len(data['accounts']) == 0: # target site may return empty if no cache of this user return None diff --git a/requirements.txt b/requirements.txt index f271a34e..f5ae4802 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,3 +16,4 @@ setproctitle tqdm opencc dnspython +typesense