def on_post(self, req, resp, session_id):
        # PUT /v1/sessions/{session_id} creates/replaces the specified session
        user_id = req.get_header('X-User-ID') and ''
        doc = self.json_body(req)
        if not doc:
            raise freezer_api_exc.BadDataFormat(
                message='Missing request body')
        new_version = self.db.replace_session(user_id=user_id,
                                              session_id=session_id,
                                              doc=doc)
        resp.status = falcon.HTTP_201
        resp.body = {'session_id': session_id, 'version': new_version}
dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py/SessionsResource.on_post/operator `or` -> `and`