Add check in Agora for validating ad response

This commit is contained in:
Mark Veidemanis 2022-02-21 10:01:38 +00:00
parent 9a3ddf609e
commit fc103e5bfa
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

View File

@ -317,6 +317,8 @@ class Agora(object):
return False return False
if ads is False: if ads is False:
return False return False
if ads["response"] is None:
return False
if "data" not in ads["response"]: if "data" not in ads["response"]:
return False return False
for ad in ads["response"]["data"]["ad_list"]: for ad in ads["response"]["data"]["ad_list"]: