Cleaned up _to_{python,mongo} + _validate mess

This commit is contained in:
Harry Marr
2009-11-22 17:26:47 +00:00
parent d4fc5c9260
commit f2d4ffa091
4 changed files with 38 additions and 40 deletions

View File

@@ -18,7 +18,7 @@ class Document(BaseDocument):
"""Save the document to the database. If the document already exists,
it will be updated, otherwise it will be created.
"""
_id = self.objects._collection.save(self._to_mongo())
_id = self.objects._collection.save(self.to_mongo())
self._id = _id
@classmethod