Remove tag count from any tag query

This commit is contained in:
Cameron
2024-12-06 09:54:53 -05:00
parent 787d1fd5d0
commit 03f3756ffd

View File

@@ -379,7 +379,7 @@ impl TagDao for SqliteTagDao {
.filter(tagged_photo::tag_id.ne_all(exclude_tag_ids)) .filter(tagged_photo::tag_id.ne_all(exclude_tag_ids))
.group_by(tagged_photo::photo_name) .group_by(tagged_photo::photo_name)
.select((tagged_photo::photo_name, count(tagged_photo::tag_id))) .select((tagged_photo::photo_name, count(tagged_photo::tag_id)))
.having(count_distinct(tagged_photo::tag_id).eq(tag_ids.len() as i64)) // .having(count_distinct(tagged_photo::tag_id).eq(tag_ids.len() as i64))
.select(tagged_photo::photo_name) .select(tagged_photo::photo_name)
.get_results::<String>(&mut self.connection) .get_results::<String>(&mut self.connection)
.with_context(|| format!("Unable to get Tagged photos with ids: {:?}", tag_ids)) .with_context(|| format!("Unable to get Tagged photos with ids: {:?}", tag_ids))