[FIX] website - force to test isdigit on a string else a tb "'int' object has no attribute 'isdigit'" can exist if the page var was right and so already and int
This commit is contained in:
parent
7ba41e75e2
commit
f4733aa895
|
@ -250,7 +250,7 @@ class website(osv.osv):
|
|||
# Compute Pager
|
||||
page_count = int(math.ceil(float(total) / step))
|
||||
|
||||
page = max(1, min(int(page if page.isdigit() else 1), page_count))
|
||||
page = max(1, min(int(page if str(page).isdigit() else 1), page_count))
|
||||
scope -= 1
|
||||
|
||||
pmin = max(page - int(math.floor(scope/2)), 1)
|
||||
|
|
Loading…
Reference in New Issue