Skip to content

Commit cb94942

Browse files
committed
make sure no -1 is realy added
1 parent aa0d09d commit cb94942

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/issue.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,9 @@ func UpdateIssueByAPI(issue *Issue) error {
15901590
return err
15911591
}
15921592
if !issue.Poster.IsGhost() {
1593+
if issue.PosterID <= 0 {
1594+
return fmt.Errorf("Issue %d can't be updated with PosterID %d", issue.Index, issue.PosterID)
1595+
}
15931596
columns = append(columns, "poster_id")
15941597
}
15951598

0 commit comments

Comments
 (0)