* Fix #3315: Release dont use tag creation date * Simplify code and apply gofmt * remove useless block (ctx.Repo.GitRepo.GetTag) on EditReleasePost * apply gofmt on modified files
This commit is contained in:
parent
ab9c5fb5e7
commit
30fda0f1ae
2 changed files with 13 additions and 1 deletions
|
@ -39,7 +39,9 @@ type Release struct {
|
|||
}
|
||||
|
||||
func (r *Release) BeforeInsert() {
|
||||
r.CreatedUnix = time.Now().Unix()
|
||||
if r.CreatedUnix == 0 {
|
||||
r.CreatedUnix = time.Now().Unix()
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Release) AfterSet(colName string, _ xorm.Cell) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue