Skip to content

Commit

Permalink
make sure no -1 is realy added
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Dec 29, 2019
1 parent aa0d09d commit cb94942
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,9 @@ func UpdateIssueByAPI(issue *Issue) error {
return err
}
if !issue.Poster.IsGhost() {
if issue.PosterID <= 0 {
return fmt.Errorf("Issue %d can't be updated with PosterID %d", issue.Index, issue.PosterID)
}
columns = append(columns, "poster_id")
}

Expand Down

0 comments on commit cb94942

Please sign in to comment.