Skip to content
Snippets Groups Projects
Commit e2fb5eca authored by Martin Mareš's avatar Martin Mareš
Browse files

PagerForm nepředpokládá, že je vložen do formuláře obsahujícího submit

parent 059d65dc
Branches
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@ class PagerForm(FlaskForm):
def apply_limits(self, query: Query, pagesize: int = 50) -> Tuple[int, Query]:
count = db.get_count(query)
# Default settings
if not self.offset.data or self.submit.data:
if not self.offset.data or hasattr(self, 'submit') and self.submit.data:
self.offset.data = 0
if not self.limit.data or self.submit.data:
if not self.limit.data or hasattr(self, 'submit') and self.submit.data:
self.limit.data = pagesize
if self.previous.data:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment