def _addEventTypeToQuery(self, query, evtType='ALL'):
    if ((evtType is None) or (not (evtType in ['ALL', 'ALARM', 'LOG']))):
        evtType = 'ALL'
    if (evtType == 'ALARM'):
        query = query.filter(or_((models.EventLog.state == 'set'), (models.EventLog.state == 'clear')))
    if (evtType == 'LOG'):
        query = query.filter((models.EventLog.state == 'log'))
    return query
def _addEventTypeToQuery(self, query, evtType='ALL'):
    if ((evtType is None) or (not (evtType in ['ALL', 'ALARM', 'LOG']))):
        evtType = 'ALL'
    if (evtType == 'ALARM'):
        query = query.filter(or_((models.EventLog.state == 'set'), (models.EventLog.state == 'clear')))
    if (evtType == 'LOG'):
        query = query.filter((models.EventLog.state == 'log'))
    return query