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