Improve perf of Doc.save by preventing a full to_mongo() call just to get the created variable
This commit is contained in:
@@ -293,8 +293,7 @@ class BaseDocument(object):
|
||||
"""
|
||||
Return as SON data ready for use with MongoDB.
|
||||
"""
|
||||
if not fields:
|
||||
fields = []
|
||||
fields = fields or []
|
||||
|
||||
data = SON()
|
||||
data['_id'] = None
|
||||
|
||||
Reference in New Issue
Block a user