summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/admin/users.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/admin/users.go b/routers/admin/users.go
index c9adf2d856..3510445329 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -5,6 +5,7 @@
package admin
import (
+ "math"
"strings"
"github.com/Unknwon/com"
@@ -30,7 +31,7 @@ func pagination(ctx *middleware.Context, count int64, pageNum int) int {
}
curCount := int64((p-1)*pageNum + pageNum)
if curCount >= count {
- p = int(count) / pageNum
+ p = int(math.Ceil(float64(count) / float64(pageNum)))
} else {
ctx.Data["NextPageNum"] = p + 1
}