From fc103e5bfae3fdd06ededa50b5adf781463a366f Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 21 Feb 2022 10:01:38 +0000 Subject: [PATCH] Add check in Agora for validating ad response --- handler/agora.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handler/agora.py b/handler/agora.py index b8e66bf..b8e1fe3 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -317,6 +317,8 @@ class Agora(object): return False if ads is False: return False + if ads["response"] is None: + return False if "data" not in ads["response"]: return False for ad in ads["response"]["data"]["ad_list"]: