zenodo_accessrequests/models.py
def accept(self, message=None, expires_at=None):
        """Accept request."""
        with db.session.begin_nested():
            if self.status != RequestStatus.PENDING:
                raise InvalidRequestStateError(RequestStatus.PENDING)
            self.status = RequestStatus.ACCEPTED
        request_accepted.send(self, message=message, expires_at=expires_at)
def accept(self, message=None, expires_at=None):
        """Accept request."""
        with db.session.begin_nested():
            if self.status != RequestStatus.PENDING:
                raise InvalidRequestStateError(RequestStatus.PENDING)
            self.status = RequestStatus.ACCEPTED
        request_accepted.send(self, message=message, expires_at=expires_at)
def accept ( self , message = None , expires_at = None ) : with db . session . begin_nested ( ) : if self . status != RequestStatus . PENDING : raise InvalidRequestStateError ( RequestStatus . PENDING ) self . status = RequestStatus . ACCEPTED request_accepted . send ( self , message = message , expires_at = expires_at )
Accept request.
Accept request .