handle no search results

This commit is contained in:
Rafael Moraes 2024-07-31 07:11:58 -03:00
parent 328428a520
commit 564ece387c

View File

@ -78,7 +78,7 @@ class AppleMusicApi:
try:
response.raise_for_status()
response_dict = response.json()
assert response_dict.get("data") or response_dict.get("results")
assert response_dict.get("data") or response_dict.get("results") is not None
except (
requests.HTTPError,
requests.exceptions.JSONDecodeError,