Skip to content

Commit

Permalink
Fix pagination issue in the tm dashboard (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Schrodi authored Apr 21, 2020
1 parent 36ebb5c commit f5c451a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tm-bot/ui/pages/pagination/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func SliceFromValues(list Interface, values url.Values) (Interface, Pages) {
indexLength := list.Len() - 1

pages := Pages{Pages: []Page{}, Current: 0, ItemCount: list.Len()}
for i := 0; i < (pages.ItemCount / itemsPerPage); i++ {
for i := 0; i <= (pages.ItemCount / itemsPerPage); i++ {
from := i * itemsPerPage
to := from + itemsPerPage - 1
if to > indexLength {
Expand Down

0 comments on commit f5c451a

Please sign in to comment.