aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/shared/actions/runners.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/shared/actions/runners.go')
-rw-r--r--routers/web/shared/actions/runners.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/routers/web/shared/actions/runners.go b/routers/web/shared/actions/runners.go
index a642cfd66d..648f8046a4 100644
--- a/routers/web/shared/actions/runners.go
+++ b/routers/web/shared/actions/runners.go
@@ -108,10 +108,7 @@ func Runners(ctx *context.Context) {
return
}
- page := ctx.FormInt("page")
- if page <= 1 {
- page = 1
- }
+ page := max(ctx.FormInt("page"), 1)
opts := actions_model.FindRunnerOptions{
ListOptions: db.ListOptions{
@@ -179,10 +176,7 @@ func RunnersEdit(ctx *context.Context) {
return
}
- page := ctx.FormInt("page")
- if page <= 1 {
- page = 1
- }
+ page := max(ctx.FormInt("page"), 1)
runnerID := ctx.PathParamInt64("runnerid")
ownerID := rCtx.OwnerID