Skip to content

Commit

Permalink
max_page controller should return 0 and not None
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim020 committed Jan 30, 2023
1 parent f9053f9 commit bb63f52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/controllers/api/show/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,9 @@ def get(self):
func.max(ScriptLine.page)).where(
ScriptLine.id.in_(line_ids)).first()[0]

if max_page is None:
max_page = 0

self.set_status(200)
self.finish({
'max_page': max_page
Expand Down

0 comments on commit bb63f52

Please sign in to comment.