mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 18:17:54 +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 {
|
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)
|
_, err := e.ID(issue.ID).AllCols().Update(issue)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user