Updated authors and changelog #163

This commit is contained in:
Ross Lawley 2013-01-22 14:05:06 +00:00
parent 473425a36a
commit 344dc64df8
3 changed files with 6 additions and 5 deletions

View File

@ -134,4 +134,5 @@ that much better:
* Martyn Smith * Martyn Smith
* Marcelo Anton * Marcelo Anton
* Aleksey Porfirov * Aleksey Porfirov
* Nicolas Trippar * Nicolas Trippar
* Manuel Hermann

View File

@ -28,6 +28,7 @@ Changes in 0.8.X
- FileFields now copyable (#198) - FileFields now copyable (#198)
- Querysets now return clones and are no longer edit in place (#56) - Querysets now return clones and are no longer edit in place (#56)
- Added support for $maxDistance (#179) - Added support for $maxDistance (#179)
- Uses getlasterror to test created on updated saves (#163)
Changes in 0.7.9 Changes in 0.7.9
================ ================

View File

@ -219,11 +219,11 @@ class Document(BaseDocument):
doc = self.to_mongo() doc = self.to_mongo()
find_delta = ('_id' not in doc or self._created or force_insert) created = ('_id' not in doc or self._created or force_insert)
try: try:
collection = self.__class__.objects._collection collection = self.__class__.objects._collection
if find_delta: if created:
if force_insert: if force_insert:
object_id = collection.insert(doc, safe=safe, object_id = collection.insert(doc, safe=safe,
**write_options) **write_options)
@ -289,8 +289,7 @@ class Document(BaseDocument):
self._changed_fields = [] self._changed_fields = []
self._created = False self._created = False
signals.post_save.send(self.__class__, document=self, signals.post_save.send(self.__class__, document=self, created=created)
created=find_delta)
return self return self
def cascade_save(self, warn_cascade=None, *args, **kwargs): def cascade_save(self, warn_cascade=None, *args, **kwargs):