Fix bug: partition can be found multiple times with private search off

This commit is contained in:
augustin64 2024-06-16 17:04:49 +02:00
parent f6690f2013
commit 9aa156a9b4

View File

@ -182,7 +182,7 @@ class User():
else: else:
self.accessible_partitions = db.execute( self.accessible_partitions = db.execute(
""" """
SELECT partition.uuid, partition.name, SELECT DISTINCT partition.uuid, partition.name,
partition.author, partition.body, partition.author, partition.body,
partition.user_id, partition.source partition.user_id, partition.source
FROM partition FROM partition
@ -196,7 +196,7 @@ class User():
ON contient_user.user_id=? ON contient_user.user_id=?
AND album_id=album.id AND album_id=album.id
UNION UNION
SELECT album.id FROM album SELECT DISTINCT album.id FROM album
JOIN groupe_contient_user JOIN groupe_contient_user
JOIN groupe_contient_album JOIN groupe_contient_album
ON groupe_contient_user.user_id=? ON groupe_contient_user.user_id=?