Raise AttributeError when necessary on QuerySet[]
This commit is contained in:
parent
007f116bfa
commit
dcec61e9b2
@ -787,6 +787,7 @@ class QuerySet(object):
|
||||
# Integer index provided
|
||||
elif isinstance(key, int):
|
||||
return self._document._from_son(self._cursor[key])
|
||||
raise AttributeError
|
||||
|
||||
def distinct(self, field):
|
||||
"""Return a list of distinct values for a given field.
|
||||
|
Loading…
x
Reference in New Issue
Block a user