

def on_patch(self, req, resp, session_id):
    user_id = (req.get_header('X-User-ID') or '')
    doc = self.json_body(req)
    new_version = self.db.update_session(user_id=user_id, session_id=session_id, patch_doc=doc)
    resp.body = {
        'session_id': session_id,
        'version': new_version,
    }

dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py SessionsResource.on_patch/original