diff --git a/mongoengine/queryset.py b/mongoengine/queryset.py index 7d89a447..92d20315 100644 --- a/mongoengine/queryset.py +++ b/mongoengine/queryset.py @@ -295,11 +295,12 @@ class QuerySet(object): return mongo_query - def get(self): + def get(self, *q_objs, **query): """Retrieve the the matching object raising 'MultipleObjectsReturned' or 'DoesNotExist' exceptions if multiple or no results are found. """ + self.__call__(*q_objs, **query) count = self.count() if count == 1: return self[0]