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)