Skip to content

Commit 96b64f4

Browse files
committed
update the default value for when no tags are provided
1 parent ebb716d commit 96b64f4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

coderd/database/queries.sql.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/provisionerdaemons.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ WHERE
1414
organization_id = @organization_id :: uuid
1515
AND
1616
-- adding support for searching by tags:
17-
(@tags :: tags = '{}' :: tags OR tags_compatible(@tags::tags, provisioner_daemons.tags::tags));
17+
(@tags :: tags = 'null' :: tags OR tags_compatible(@tags::tags, provisioner_daemons.tags::tags));
1818

1919
-- name: DeleteOldProvisionerDaemons :exec
2020
-- Delete provisioner daemons that have been created at least a week ago

coderd/database/queries/provisionerjobs.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ WHERE
2222
AND nested.organization_id = @organization_id
2323
-- Ensure the caller has the correct provisioner.
2424
AND nested.provisioner = ANY(@types :: provisioner_type [ ])
25-
AND tags_compatible(@tags :: jsonb, nested.tags)
25+
AND tags_compatible(nested.tags, @tags :: jsonb)
2626
ORDER BY
2727
nested.created_at
2828
FOR UPDATE

0 commit comments

Comments
 (0)