Skip to content

Commit

Permalink
fix limit not set
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLechemia committed Jul 20, 2023
1 parent 71fbdbe commit e461ccf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils_flask_sqla/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def build_query_filters(self, query, parameters):
"""
for f in parameters:
query = self.build_query_filter(query, f, parameters.get(f))

return query

def build_query_filter(self, query, param_name, param_value):
Expand Down Expand Up @@ -248,13 +247,12 @@ def raw_query(self, process_filter=True):

if not process_filter:
return q

if self.filters:
unordered_q = self.build_query_filters(q, self.filters)
q = self.build_query_order(unordered_q, self.filters)

if self.limit != -1:
q.limit(self.limit).offset(self.offset * self.limit)
q = q.limit(self.limit).offset(self.offset * self.limit)

return q

Expand Down

0 comments on commit e461ccf

Please sign in to comment.