(domain, user_filters, count_only=False)
return invitations
Similar to _get_users_by_filters, but applites to invitations.

    Applies "search_string" filter to the invitations' emails. This does not
    support ES search syntax, it's just a case-insensitive substring search.
    Ignores any other filters.
Similar to _get_users_by_filters, but applites to invitations.
Similar to _get_users_by_filters but applites to invitations .
def _get_invitations_by_filters(domain, user_filters, count_only=False):
    """
    Similar to _get_users_by_filters, but applites to invitations.

    Applies "search_string" filter to the invitations' emails. This does not
    support ES search syntax, it's just a case-insensitive substring search.
    Ignores any other filters.
    """
    filters = {}
    search_string = user_filters.get("search_string", None)
    if search_string:
        filters["email__icontains"] = search_string
    role_id = user_filters.get("role_id", None)
    if role_id:
        role = UserRole.objects.by_couch_id(role_id)
        filters["role"] = role.get_qualified_id()

    invitations = Invitation.by_domain(domain, **filters)
    if count_only:
        return invitations.count()
    return invitations
def _get_invitations_by_filters ( domain , user_filters , count_only = False ) : filters = { } search_string = user_filters . get ( "search_string" , None ) if search_string : filters [ "email__icontains" ] = search_string role_id = user_filters . get ( "role_id" , None ) if role_id : role = UserRole . objects . by_couch_id ( role_id ) filters [ "role" ] = role . get_qualified_id ( ) invitations = Invitation . by_domain ( domain , * * filters ) if count_only : return invitations . count ( ) return invitations