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
+2 -3
View File
@@ -6818,12 +6818,11 @@ func (q *FakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
}
// We omit locked workspaces by default.
if arg.DormantAt.IsZero() && workspace.DormantAt.Valid {
if arg.IsDormant == "" && workspace.DormantAt.Valid {
continue
}
// Filter out workspaces that are locked after the timestamp.
if !arg.DormantAt.IsZero() && workspace.DormantAt.Time.Before(arg.DormantAt) {
if arg.IsDormant != "" && !workspace.DormantAt.Valid {
continue
}