mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 15:02:16 +00: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 a new issue