Fix pas de résultats et erreur 500
This commit is contained in:
@@ -178,7 +178,6 @@ def get_tracks(
|
|||||||
query = query.filter(AudioTrack.instruments.any(instrument))
|
query = query.filter(AudioTrack.instruments.any(instrument))
|
||||||
# Second, track's instruments array length must match the specified instruments count
|
# Second, track's instruments array length must match the specified instruments count
|
||||||
# This is PostgreSQL specific - we check that the array has exactly the same elements
|
# This is PostgreSQL specific - we check that the array has exactly the same elements
|
||||||
from sqlalchemy import func
|
|
||||||
query = query.filter(func.array_length(AudioTrack.instruments, 1) == len(instruments))
|
query = query.filter(func.array_length(AudioTrack.instruments, 1) == len(instruments))
|
||||||
else:
|
else:
|
||||||
# Track must have ALL specified instruments (but can have others too)
|
# Track must have ALL specified instruments (but can have others too)
|
||||||
|
|||||||
Reference in New Issue
Block a user