Skip to content

Commit

Permalink
made QuerySet.exists() return a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Apr 25, 2024
1 parent 7008f89 commit d154f74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
lookup.tests.LookupTests.test_escaping
model_fields
or_lookups
sessions_tests
docs:
name: Docs Checks
Expand Down
2 changes: 1 addition & 1 deletion django_mongodb/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def results_iter(
yield self._make_result(entity, columns, tuple_expected=tuple_expected)

def has_results(self):
return self.get_count(check_exists=True)
return bool(self.get_count(check_exists=True))

def _make_result(self, entity, columns, tuple_expected=False):
"""
Expand Down

0 comments on commit d154f74

Please sign in to comment.