From beaa9a2034cd71c1fdab883a9ffc3ccf433b6893 Mon Sep 17 00:00:00 2001 From: jowlee Date: Thu, 26 May 2022 21:32:04 +0000 Subject: [PATCH] Add check if download is none --- discovery-provider/src/queries/get_tracks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discovery-provider/src/queries/get_tracks.py b/discovery-provider/src/queries/get_tracks.py index 68efd930606..75c2db5f42e 100644 --- a/discovery-provider/src/queries/get_tracks.py +++ b/discovery-provider/src/queries/get_tracks.py @@ -209,7 +209,8 @@ def get_tracks_and_ids(): for track in tracks: if track["user"][0]["is_deactivated"] or track["is_delete"]: track["track_segments"] = [] - track["download"]["cid"] = None + if track["download"] is not None: + track["download"]["cid"] = None tracks = populate_track_metadata(session, track_ids, tracks, current_user_id)