Skip to content

Commit 39217cd

Browse files
committed
refactor
1 parent 8bf5f0e commit 39217cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/api/v1/repo/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func ListPullRequests(ctx *context.APIContext) {
113113
return
114114
}
115115
var posterID int64
116-
if ctx.FormString("poster") != "" {
117-
poster, err := user_model.GetUserByName(ctx, ctx.FormString("poster"))
116+
if posterStr := ctx.FormString("poster"); posterStr != "" {
117+
poster, err := user_model.GetUserByName(ctx, posterStr)
118118
if err != nil {
119119
if user_model.IsErrUserNotExist(err) {
120120
ctx.Error(http.StatusBadRequest, "Poster not found", err)

0 commit comments

Comments
 (0)