Skip to content

Commit

Permalink
Revert commit df1d052
Browse files Browse the repository at this point in the history
  • Loading branch information
javinp committed Jun 5, 2020
1 parent df1d052 commit 2f694dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django_mongodb_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

__version__ = (0, 4, 0, 'bigml-3')
__version__ = (0, 4, 0, 'bigml-4')
__author__ = "Flavio Percoco Premoli, Alberto Paro, " + \
"Jonas Haag and contributors"
__contact__ = "[email protected]"
Expand Down
7 changes: 6 additions & 1 deletion django_mongodb_engine/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ def fetch(self, low_mark, high_mark):
@safe_call
def count(self, limit=None, with_limit_and_skip=False):
results = self._get_results()

if limit is not None:
results.limit(limit)
return results.count(with_limit_and_skip=True)

#################################
# Put 10000 hard-limit on count #
#################################
return results.limit(10000).count(with_limit_and_skip=True)
#return results.limit(10001).count(with_limit_and_skip=True)

@safe_call
def order_by(self, ordering):
Expand Down

0 comments on commit 2f694dd

Please sign in to comment.