From 8115a6c2208b3924fb94b412c351c881edbbf9b8 Mon Sep 17 00:00:00 2001 From: dnns01 <git@dnns01.de> Date: Wed, 30 Jun 2021 14:57:53 +0200 Subject: [PATCH] Fix authentication for haugebot webinterface --- haugebot_web/twitch_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/haugebot_web/twitch_api.py b/haugebot_web/twitch_api.py index 63d8ce0..c14b6fe 100644 --- a/haugebot_web/twitch_api.py +++ b/haugebot_web/twitch_api.py @@ -88,7 +88,10 @@ def is_mod(user, broadcaster): return False return is_mod(user, broadcaster) - return response.json().get("data") is not None + if data := response.json().get("data"): + return len(data) > 0 + else: + return False def refresh_access_token(broadcaster): -- GitLab