def confirm_email(self):
with db.session.begin_nested():<EOL><INDENT>if self.status != RequestStatus.EMAIL_VALIDATION:<EOL><INDENT>raise InvalidRequestStateError(RequestStatus.EMAIL_VALIDATION)<EOL><DEDENT>self.status = RequestStatus.PENDING<EOL><DEDENT>request_confirmed.send(self)<EOL>
Confirm that senders email is valid.