Added test for meta[indexes]
This commit is contained in:
@@ -67,8 +67,6 @@ class Document(BaseDocument):
|
||||
def reload(self):
|
||||
"""Reloads all attributes from the database.
|
||||
"""
|
||||
#object_id = self._fields['id'].to_mongo(self.id)
|
||||
#obj = self.__class__.objects(id=object_id).first()
|
||||
obj = self.__class__.objects(id=self.id).first()
|
||||
for field in self._fields:
|
||||
setattr(self, field, getattr(obj, field))
|
||||
|
||||
@@ -25,7 +25,7 @@ class QuerySet(object):
|
||||
self._query = {'_types': self._document._class_name}
|
||||
self._cursor_obj = None
|
||||
|
||||
def ensure_index(self, key_or_list, direction=None):
|
||||
def ensure_index(self, key_or_list):
|
||||
"""Ensure that the given indexes are in place.
|
||||
"""
|
||||
if isinstance(key_or_list, basestring):
|
||||
|
||||
Reference in New Issue
Block a user