diff --git a/modules/context/context.go b/modules/context/context.go index 909c4d5..cf5eb7d 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -39,6 +39,9 @@ type TeaContext struct { func (ctx *TeaContext) GetListOptions() gitea.ListOptions { page := ctx.Int("page") limit := ctx.Int("limit") + if limit < 0 { + limit = 0 + } if limit != 0 && page == 0 { page = 1 }