diff --git a/web/handlers/subscribe.py b/web/handlers/subscribe.py index e29ed2a37f4..4ed324d2b4b 100644 --- a/web/handlers/subscribe.py +++ b/web/handlers/subscribe.py @@ -67,7 +67,7 @@ async def post(self, userid): repos = json.loads((await self.db.site.get(1, fields=('repos',), sql_session=sql_session))['repos']) if proxies: proxy = random.choice(proxies) - if proxy.get("href"): + if proxy and proxy.get("href"): proxy = proxy["href"] else: proxy = None