Skip to content

Commit c1c5b72

Browse files
authored
fix pagination total pages count
1 parent 8556c2a commit c1c5b72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def get_all_databases(
7272
Database.database_flavour_name == database_flavour_name)
7373

7474
total_count = query.count()
75-
total_pages = (total_count + per_page - 1)
75+
total_pages = (total_count + per_page - 1) // per_page
7676

7777
offset = (page - 1) * per_page
7878
paginated_query = query.offset(offset).limit(per_page)

0 commit comments

Comments
 (0)