From b7f13d4cbfaee82cd68835e10c074ae0aa1d293e Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 4 Dec 2024 19:42:00 -0500 Subject: [PATCH] Fix exclude filtering for any tags --- src/tags.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tags.rs b/src/tags.rs index d7abaca..db28533 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -379,6 +379,7 @@ impl TagDao for SqliteTagDao { .filter(tagged_photo::tag_id.ne_all(exclude_tag_ids)) .group_by(tagged_photo::photo_name) .select((tagged_photo::photo_name, count(tagged_photo::tag_id))) + .having(count_distinct(tagged_photo::tag_id).eq(tag_ids.len() as i64)) .select(tagged_photo::photo_name) .get_results::(&mut self.connection) .with_context(|| format!("Unable to get Tagged photos with ids: {:?}", tag_ids))