Fix limit usage in aggregate
As per https://stackoverflow.com/a/24161461
This commit is contained in:
parent
827de76345
commit
9f2a9d9cda
@ -1200,7 +1200,7 @@ class BaseQuerySet(object):
|
||||
initial_pipeline.append({'$sort': dict(self._ordering)})
|
||||
|
||||
if self._limit is not None:
|
||||
initial_pipeline.append({'$limit': self._limit})
|
||||
initial_pipeline.append({'$limit': self._limit + self._skip})
|
||||
|
||||
if self._skip is not None:
|
||||
initial_pipeline.append({'$skip': self._skip})
|
||||
|
Loading…
x
Reference in New Issue
Block a user