fix(label): ignore existing ID during creation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kolaente 2024-09-10 16:45:40 +02:00
parent 020fea686d
commit e698ac5a34
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -51,7 +51,7 @@ type Label struct {
}
// TableName makes a pretty table name
func (Label) TableName() string {
func (*Label) TableName() string {
return "labels"
}
@ -73,6 +73,7 @@ func (l *Label) Create(s *xorm.Session, a web.Auth) (err error) {
return
}
l.ID = 0
l.HexColor = utils.NormalizeHex(l.HexColor)
l.CreatedBy = u
l.CreatedByID = u.ID