mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-01 15:52:05 +01:00
dont insert "-1" in any case to issue.poster_id
This commit is contained in:
parent
408b522634
commit
05469ab6d8
@ -1569,6 +1569,12 @@ func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int6
|
||||
}
|
||||
|
||||
func updateIssue(e Engine, issue *Issue) error {
|
||||
if issue.PosterID <= 0 {
|
||||
_, err := e.Table("`issue`").Where("id = ?", issue.ID).Select("poster_id").Get(&issue.PosterID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
_, err := e.ID(issue.ID).AllCols().Update(issue)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user