(self, son, collection)
return son
Add an _id field if it is missing.
Add an _id field if it is missing.
Add an _id field if it is missing .
def transform_incoming(self, son, collection):
        """Add an _id field if it is missing.
        """
        if not "_id" in son:
            son["_id"] = ObjectId()
        return son
def transform_incoming ( self , son , collection ) : if not "_id" in son : son [ "_id" ] = ObjectId ( ) return son