fix #358 Co-authored-by: Brahim Hamdouni <brahim@hamdouni.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/359 Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: Norwin <noerw@noreply.gitea.io> Co-authored-by: Brahim HAMDOUNI <hamdouni@noreply.gitea.io> Co-committed-by: Brahim HAMDOUNI <hamdouni@noreply.gitea.io>
This commit is contained in:
parent
568fde1ce5
commit
ffdbdb3d02
|
@ -39,6 +39,9 @@ type TeaContext struct {
|
||||||
func (ctx *TeaContext) GetListOptions() gitea.ListOptions {
|
func (ctx *TeaContext) GetListOptions() gitea.ListOptions {
|
||||||
page := ctx.Int("page")
|
page := ctx.Int("page")
|
||||||
limit := ctx.Int("limit")
|
limit := ctx.Int("limit")
|
||||||
|
if limit < 0 {
|
||||||
|
limit = 0
|
||||||
|
}
|
||||||
if limit != 0 && page == 0 {
|
if limit != 0 && page == 0 {
|
||||||
page = 1
|
page = 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue