Additional checks on response in enum_ads

This commit is contained in:
Mark Veidemanis 2022-05-10 21:42:39 +01:00
parent b2b7b3b923
commit 74e108603f
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

View File

@ -259,6 +259,8 @@ class Local(util.Base):
ads_total = []
if not ads["success"]:
return False
if not ads["response"]:
return False
for ad in ads["response"]["data"]["ad_list"]:
if self.platform == "agora":
asset = ad["data"]["asset"]