mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 18:24:39 +08:00
Trim title before insert/update to database to match the size requirements of database (#32498)
Fix #32489
This commit is contained in:
@ -156,6 +156,7 @@ func IsReleaseExist(ctx context.Context, repoID int64, tagName string) (bool, er
|
||||
|
||||
// UpdateRelease updates all columns of a release
|
||||
func UpdateRelease(ctx context.Context, rel *Release) error {
|
||||
rel.Title, _ = util.SplitStringAtByteN(rel.Title, 255)
|
||||
_, err := db.GetEngine(ctx).ID(rel.ID).AllCols().Update(rel)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user