fix: always show a newly created workspace at the top of the list (#6984)

Fixes #5795.
This commit is contained in:
Kyle Carberry
2023-04-04 08:24:04 -05:00
committed by GitHub
parent 46f42ea9ac
commit c12bc39821
6 changed files with 14 additions and 9 deletions

View File

@ -145,6 +145,7 @@ func Workspace(t testing.TB, db database.Store, orig database.Workspace) databas
UpdatedAt: takeFirst(orig.UpdatedAt, database.Now()),
OrganizationID: takeFirst(orig.OrganizationID, uuid.New()),
TemplateID: takeFirst(orig.TemplateID, uuid.New()),
LastUsedAt: takeFirst(orig.LastUsedAt, database.Now()),
Name: takeFirst(orig.Name, namesgenerator.GetRandomName(1)),
AutostartSchedule: orig.AutostartSchedule,
Ttl: orig.Ttl,