Skip to content

Commit

Permalink
Fix - aggregation request arguments for LIMIT (#2393)
Browse files Browse the repository at this point in the history
Co-authored-by: Chayim <chayim@users.noreply.github.com>
  • Loading branch information
dvora-h and chayim authored Sep 29, 2022
1 parent 7ee76a8 commit fbf68dd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions redis/commands/search/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def __init__(self, query="*"):
self._aggregateplan = []
self._loadfields = []
self._loadall = False
self._limit = Limit()
self._max = 0
self._with_schema = False
self._verbatim = False
Expand Down Expand Up @@ -211,7 +210,8 @@ def limit(self, offset, num):
`sort_by()` instead.
"""
self._limit = Limit(offset, num)
_limit = Limit(offset, num)
self._aggregateplan.extend(_limit.build_args())
return self

def sort_by(self, *fields, **kwargs):
Expand Down Expand Up @@ -323,8 +323,6 @@ def build_args(self):

ret.extend(self._aggregateplan)

ret += self._limit.build_args()

return ret


Expand Down

0 comments on commit fbf68dd

Please sign in to comment.