Skip to content

Commit a173bfb

Browse files
committed
update the default value for when no tags are provided
1 parent 9985ef6 commit a173bfb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

coderd/database/queries.sql.go

Lines changed: 1 addition & 1 deletion
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 :: jsonb = '{}' :: jsonb OR tags_compatible(@tags :: jsonb, provisioner_daemons.tags :: jsonb));
17+
(@tags :: jsonb = '' :: jsonb OR tags_compatible(@tags :: jsonb, provisioner_daemons.tags :: jsonb));
1818

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

enterprise/coderd/provisionerdaemons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (api *API) provisionerDaemons(rw http.ResponseWriter, r *http.Request) {
9494
func provisionerTags(r *http.Request) ([]byte, error) {
9595
tags := r.URL.Query()["tags"]
9696
if len(tags) == 0 {
97-
return []byte("{}"), nil
97+
return []byte{}, nil
9898
}
9999

100100
tagMap := map[string]string{}

0 commit comments

Comments
 (0)