def build_where(condition, has_where):
    # type: (str, bool) -> str
    '''
    Builds another part of a where clause depending on whether any other clauses
    have been used yet.
    '''
    s = 'AND' if has_where else 'WHERE'
    return '{0} {1}\n'.format(s, condition)
Builds another part of a where clause depending on whether any other clauses
have been used yet.
frontend/securitybot_api.py