Skip to content

Commit 50782dd

Browse files
committed
made QuerySet.exists() return a boolean
1 parent 28f2a34 commit 50782dd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
lookup.tests.LookupTests.test_escaping
7474
model_fields
7575
or_lookups
76+
sessions_tests
7677
7778
docs:
7879
name: Docs Checks

django_mongodb/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def results_iter(
5858
yield self._make_result(entity, columns, tuple_expected=tuple_expected)
5959

6060
def has_results(self):
61-
return self.get_count(check_exists=True)
61+
return bool(self.get_count(check_exists=True))
6262

6363
def _make_result(self, entity, columns, tuple_expected=False):
6464
"""

0 commit comments

Comments
 (0)