Fix prev_page_url offset when on page 2 going back to page 1.

This commit is contained in:
voussoir 2020-04-02 21:37:50 -07:00
parent 89c308c4a4
commit 32a161baa8

View file

@ -429,6 +429,8 @@ def get_search_core():
prev_offset = max(0, offset - limit) prev_offset = max(0, offset - limit)
if prev_offset > 0: if prev_offset > 0:
prev_params['offset'] = prev_offset prev_params['offset'] = prev_offset
else:
prev_params.pop('offset', None)
prev_params = helpers.dict_to_params(prev_params) prev_params = helpers.dict_to_params(prev_params)
prev_page_url = '/search' + prev_params prev_page_url = '/search' + prev_params
else: else: