We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc981bd commit 669f3baCopy full SHA for 669f3ba
mongoengine/queryset/base.py
@@ -722,7 +722,7 @@ def with_id(self, object_id):
722
:param object_id: the value for the id of the document to look up
723
"""
724
queryset = self.clone()
725
- if bool(queryset._query_obj):
+ if queryset._query_obj:
726
msg = "Cannot use a filter whilst using `with_id`"
727
raise InvalidQueryError(msg)
728
return queryset.filter(pk=object_id).first()
0 commit comments