We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bf5f0e commit 39217cdCopy full SHA for 39217cd
routers/api/v1/repo/pull.go
@@ -113,8 +113,8 @@ func ListPullRequests(ctx *context.APIContext) {
113
return
114
}
115
var posterID int64
116
- if ctx.FormString("poster") != "" {
117
- poster, err := user_model.GetUserByName(ctx, ctx.FormString("poster"))
+ if posterStr := ctx.FormString("poster"); posterStr != "" {
+ poster, err := user_model.GetUserByName(ctx, posterStr)
118
if err != nil {
119
if user_model.IsErrUserNotExist(err) {
120
ctx.Error(http.StatusBadRequest, "Poster not found", err)
0 commit comments