fix: Return deleted users when fetching workspace builds (#4441)

Fixes #4359.
This commit is contained in:
Kyle Carberry
2022-10-10 13:03:54 -05:00
committed by GitHub
parent 85c679597c
commit daa34cf7b8
7 changed files with 52 additions and 26 deletions

View File

@ -9,7 +9,10 @@ LIMIT
1;
-- name: GetUsersByIDs :many
SELECT * FROM users WHERE id = ANY(@ids :: uuid [ ]) AND deleted = @deleted;
-- This shouldn't check for deleted, because it's frequently used
-- to look up references to actions. eg. a user could build a workspace
-- for another user, then be deleted... we still want them to appear!
SELECT * FROM users WHERE id = ANY(@ids :: uuid [ ]);
-- name: GetUserByEmailOrUsername :one
SELECT