1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 17:53:10 +00:00

bug fixed

This commit is contained in:
Lunny Xiao 2014-04-30 11:12:03 +08:00
parent 2401e68d7e
commit 1e9f376d3d

View file

@ -71,7 +71,7 @@ func CreateIssue(userId, repoId, milestoneId, assigneeId int64, issueCount int,
} }
if err = sess.Commit(); err != nil { if err = sess.Commit(); err != nil {
sess.Rollback() //sess.Rollback()
return nil, err return nil, err
} }
@ -196,7 +196,7 @@ func CreateComment(userId, repoId, issueId, commitId, line int64, cmtType int, c
defer sess.Close() defer sess.Close()
sess.Begin() sess.Begin()
if _, err := orm.Insert(&Comment{PosterId: userId, Type: cmtType, IssueId: issueId, if _, err := sess.Insert(&Comment{PosterId: userId, Type: cmtType, IssueId: issueId,
CommitId: commitId, Line: line, Content: content}); err != nil { CommitId: commitId, Line: line, Content: content}); err != nil {
sess.Rollback() sess.Rollback()
return err return err