Skip to content

Commit

Permalink
Merge pull request #9 from PuckiSilver/master
Browse files Browse the repository at this point in the history
fix 'show 1 less' error and set missing 20 to 24
  • Loading branch information
HoodieRocks authored Dec 18, 2023
2 parents e52b32b + 656fc9b commit 9fca6ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def all_projects() -> dict[str, Any] | tuple[str, int]:

out: list[dict[str, Any]] = []

for item in r[(page - 1) * 24 : page * 24 - 1]:
for item in r[(page - 1) * 24 : page * 24]:
try:
temp = parse_project(item, request, conn)
except:
Expand All @@ -225,7 +225,7 @@ def all_projects() -> dict[str, Any] | tuple[str, int]:

out.append(temp)

return {"count": len(out), "result": out, "pages": str(math.ceil(len(r) / 20))}
return {"count": len(out), "result": out, "pages": str(math.ceil(len(r) / 24))}


@projects.route("/id/<int:id>")
Expand Down

0 comments on commit 9fca6ad

Please sign in to comment.