fix: fix template edit overriding with flag defaults (#11564)

This commit is contained in:
Jon Ayers
2024-01-11 16:18:46 -06:00
committed by GitHub
parent eb8d85f432
commit aecdafdcf2
7 changed files with 241 additions and 31 deletions
+3
View File
@@ -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()),