fix for -1 reference handling
This commit is contained in:
parent
13ebc8a1e8
commit
435f16b779
@ -103,6 +103,7 @@ def playlist():
|
||||
playlist_references = []
|
||||
|
||||
if request_json.get('playlist_references', None):
|
||||
if request_json['playlist_references'] != -1:
|
||||
for i in request_json['playlist_references']:
|
||||
retrieved_ref = database.get_user_playlist_ref_by_user_ref(user_ref, i)
|
||||
if retrieved_ref:
|
||||
@ -110,7 +111,7 @@ def playlist():
|
||||
else:
|
||||
return jsonify({"message": f'managed playlist {i} not found', "status": "error"}), 400
|
||||
|
||||
if len(playlist_references) == 0:
|
||||
if len(playlist_references) == 0 and request_json.get('playlist_references', None) != -1:
|
||||
playlist_references = None
|
||||
|
||||
playlist_id = request_json.get('id', None)
|
||||
|
Loading…
Reference in New Issue
Block a user