first adaptations after comments and find-outs

This commit is contained in:
mrigal
2015-04-09 10:57:19 +02:00
committed by Matthieu Rigal
parent 46817caa68
commit ccbd128fa2
4 changed files with 13 additions and 12 deletions

View File

@@ -295,10 +295,10 @@ class Document(BaseDocument):
# I think the self._created flag is not necessarily required in PyMongo3
# but may cause test test_collection_name_and_primary to fail
if pymongo.version_tuple[0] < 3:
created = ('_id' not in doc or self._created or force_insert)
else:
created = ('_id' not in doc or force_insert)
# if pymongo.version_tuple[0] < 3:
created = ('_id' not in doc or self._created or force_insert)
# else:
# created = ('_id' not in doc or force_insert)
signals.pre_save_post_validation.send(self.__class__, document=self,
created=created)