fix: do not skip properties on creating templates (#5060)

* fix: do not skip properties while creating templates

* test: empty edit
This commit is contained in:
Marcin Tojek
2022-11-14 15:32:18 +01:00
committed by GitHub
parent 4b3d211e00
commit cf5d48bb5a
3 changed files with 104 additions and 2 deletions

View File

@ -2091,6 +2091,8 @@ func (q *fakeQuerier) InsertTemplate(_ context.Context, arg database.InsertTempl
CreatedBy: arg.CreatedBy,
UserACL: arg.UserACL,
GroupACL: arg.GroupACL,
DisplayName: arg.DisplayName,
Icon: arg.Icon,
}
q.templates = append(q.templates, template)
return template, nil

View File

@ -239,6 +239,8 @@ func (api *API) postTemplateByOrganization(rw http.ResponseWriter, r *http.Reque
GroupACL: database.TemplateACL{
organization.ID.String(): []rbac.Action{rbac.ActionRead},
},
DisplayName: createTemplate.DisplayName,
Icon: createTemplate.Icon,
})
if err != nil {
return xerrors.Errorf("insert template: %s", err)