@treeio_login_required
def ajax_user_lookup(request, response_format='html'):
    "Returns a list of matching users"

    users = []
    if request.GET and request.GET in 'term':
        users = User.objects.filter(Q(name__icontains=request.GET['term']) |
                                    Q(contact__name__icontains=request.GET['term']))

    return render_to_response('identities/ajax_user_lookup',
                              {'users': users},
                              context_instance=RequestContext(request),
                              response_format=response_format)
dataset/ETHPy150Open treeio/treeio/treeio/identities/views.py/ajax_user_lookup/swapped operands of `in`