fix: show template autostop setting when it overrides the workspace setting (#12910)

This commit is contained in:
Kayla Washburn-Love
2024-04-11 13:08:51 -06:00
committed by GitHub
parent 22785a307c
commit 2ad7fcc0b7
4 changed files with 48 additions and 4 deletions
+5
View File
@@ -1649,6 +1649,11 @@ func convertWorkspace(
}
ttlMillis := convertWorkspaceTTLMillis(workspace.Ttl)
// If the template doesn't allow a workspace-configured value, then report the
// template value instead.
if !template.AllowUserAutostop {
ttlMillis = convertWorkspaceTTLMillis(sql.NullInt64{Valid: true, Int64: template.DefaultTTL})
}
// Only show favorite status if you own the workspace.
requesterFavorite := workspace.OwnerID == requesterID && workspace.Favorite