Skip to content

Commit

Permalink
small fix to the tags filters SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
DonKoko committed Dec 13, 2024
1 parent 19b6d17 commit 1803d36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/modules/asset/query.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,10 +776,10 @@ function addArrayFilter(whereClause: Prisma.Sql, filter: Filter): Prisma.Sql {
return Prisma.sql`${whereClause} AND NOT EXISTS (
SELECT LOWER(unnest(${values}::text[])) AS required_tag
EXCEPT
SELECT LOWER(t2.name)
FROM "_AssetToTag" att2
JOIN "Tag" t2 ON t2.id = att2."B"
WHERE att2."A" = a.id
SELECT LOWER(t.name)
FROM "_AssetToTag" att
JOIN "Tag" t ON t.id = att."B"
WHERE att."A" = a.id
)`;
}
case "containsAny": {
Expand Down

0 comments on commit 1803d36

Please sign in to comment.