Skip to content

Commit 0120c5b

Browse files
committed
chore: use workspace.IsPrebuild() on convertWorkspace
1 parent d5e45bb commit 0120c5b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

coderd/workspaces.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,11 +2232,6 @@ func convertWorkspace(
22322232
appStatus = nil
22332233
}
22342234

2235-
isPrebuild := false
2236-
if workspace.OwnerID == database.PrebuildsSystemUserID {
2237-
isPrebuild = true
2238-
}
2239-
22402235
return codersdk.Workspace{
22412236
ID: workspace.ID,
22422237
CreatedAt: workspace.CreatedAt,
@@ -2271,7 +2266,7 @@ func convertWorkspace(
22712266
AllowRenames: allowRenames,
22722267
Favorite: requesterFavorite,
22732268
NextStartAt: nextStartAt,
2274-
IsPrebuild: isPrebuild,
2269+
IsPrebuild: workspace.IsPrebuild(),
22752270
}, nil
22762271
}
22772272

0 commit comments

Comments
 (0)