mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: fix template edit overriding with flag defaults (#11564)
This commit is contained in:
@@ -72,6 +72,9 @@ func Template(t testing.TB, db database.Store, seed database.Template) database.
|
||||
seed.OrganizationID.String(): []rbac.Action{rbac.ActionRead},
|
||||
}
|
||||
}
|
||||
if seed.UserACL == nil {
|
||||
seed.UserACL = database.TemplateACL{}
|
||||
}
|
||||
err := db.InsertTemplate(genCtx, database.InsertTemplateParams{
|
||||
ID: id,
|
||||
CreatedAt: takeFirst(seed.CreatedAt, dbtime.Now()),
|
||||
|
||||
@@ -6374,6 +6374,7 @@ func (q *FakeQuerier) UpdateTemplateMetaByID(_ context.Context, arg database.Upd
|
||||
tpl.Description = arg.Description
|
||||
tpl.Icon = arg.Icon
|
||||
tpl.GroupACL = arg.GroupACL
|
||||
tpl.AllowUserCancelWorkspaceJobs = arg.AllowUserCancelWorkspaceJobs
|
||||
q.templates[idx] = tpl
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user