Fix mirror issue on db.collection.update
def _serialize_data(self, doc):
_doc = doc.copy()
for key, value in _doc.items():
if isinstance(value, datetime):
doc[key] = value.isoformat()
elif isinstance(value, (ObjectId, uuid.UUID)):
doc[key] = str(value)
return doc
this part could open hidden fields if it was directly changed by db.collection.update
proposal is to use _id and make call to DB and get full document and use _serialize_document
always