Add flexibility for fields handling bad data (MongoEngine/mongoengine#78)

This commit is contained in:
Ross Lawley
2012-08-17 16:02:33 +01:00
parent 22010d7d95
commit 90fa0f6c4a
3 changed files with 39 additions and 11 deletions

View File

@@ -207,7 +207,6 @@ class Document(BaseDocument):
else:
object_id = doc['_id']
updates, removals = self._delta()
# Need to add shard key to query, or you get an error
select_dict = {'_id': object_id}
shard_key = self.__class__._meta.get('shard_key', tuple())