From 9aa156a9b4ae432a34e208b7bac6e9cf067b0b03 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sun, 16 Jun 2024 17:04:49 +0200 Subject: [PATCH] Fix bug: partition can be found multiple times with private search off --- partitioncloud/modules/classes/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/partitioncloud/modules/classes/user.py b/partitioncloud/modules/classes/user.py index 1161f91..d948374 100644 --- a/partitioncloud/modules/classes/user.py +++ b/partitioncloud/modules/classes/user.py @@ -182,7 +182,7 @@ class User(): else: self.accessible_partitions = db.execute( """ - SELECT partition.uuid, partition.name, + SELECT DISTINCT partition.uuid, partition.name, partition.author, partition.body, partition.user_id, partition.source FROM partition @@ -196,7 +196,7 @@ class User(): ON contient_user.user_id=? AND album_id=album.id UNION - SELECT album.id FROM album + SELECT DISTINCT album.id FROM album JOIN groupe_contient_user JOIN groupe_contient_album ON groupe_contient_user.user_id=?