def event_log_delete(self, id):
    with _session_for_write() as session:
        query = model_query(models.EventLog, session=session)
        query = query.filter_by(id=id)
        try:
            query.one()
        except NoResultFound:
            raise exceptions.EventLogNotFound(eventLog=id)
        query.delete()
def event_log_delete(self, id):
    with _session_for_write() as session:
        query = model_query(models.EventLog, session=session)
        query = query.filter_by(id=id)
        try:
            query.one()
        except NoResultFound:
            raise exceptions.EventLogNotFound(eventLog=id)
        query.delete()