Merge pull request #5 from bogey3/master

Fixed integer division issue
This commit is contained in:
Vincent Yiu 2019-05-10 17:13:45 +08:00 committed by GitHub
commit f5d92795be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,7 @@ def get_search():
data_total = content['elements'][0]['total']
# Calculate pages off final results at 40 results/page
pages = data_total / 40
pages = int(math.ceil(data_total / 40.0))
if pages == 0:
pages = 1