mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-30 06:09:26 +01:00
dont insert "-1" in any case to issue.poster_id
This commit is contained in:
parent
408b522634
commit
05469ab6d8
1 changed files with 6 additions and 0 deletions
|
@ -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