fix: use is-dormant instead of dormant_at (#10191)

This commit is contained in:
Jon Ayers
2023-10-10 19:00:09 -05:00
committed by GitHub
parent 652e1a7d43
commit ec9b480ac0
14 changed files with 61 additions and 205 deletions

View File

@ -242,8 +242,8 @@ WHERE
-- Filter by dormant workspaces. By default we do not return dormant
-- workspaces since they are considered soft-deleted.
AND CASE
WHEN @dormant_at :: timestamptz > '0001-01-01 00:00:00+00'::timestamptz THEN
dormant_at IS NOT NULL AND dormant_at >= @dormant_at
WHEN @is_dormant :: text != '' THEN
dormant_at IS NOT NULL
ELSE
dormant_at IS NULL
END