@handle_response_format
@treeio_login_required
def contact_me(request, attribute='', response_format='html'):
    "My Contact card"

    contact = request.user.profile.get_contact()
    if not request.user.profile.has_permission(contact):
        return user_denied(request, message="You don't have access to this Contact")
    types = Object.filter_by_request(
        request, ContactType.objects.order_by('name'))

    if not contact:
        return render_to_response('identities/contact_me_missing', {'types': types},
                                  context_instance=RequestContext(request), response_format=response_format)

    subcontacts = Object.filter_by_request(request, contact.child_set)
    contact_values = contact.contactvalue_set.order_by('field__name')

    objects = get_contact_objects(
        request.user.profile, contact, preformat=True)

    module = None
    for key in objects:
        if not attribute:
            if objects[key]['count']:
                # attribute = objects[key]['objects'].keys()[0]
                module = objects[key]['module']
        else:
            if objects[key]['objects'].keys() in attribute:
                module = objects[key]['module']
                break

    return render_to_response('identities/contact_me',
                              {'contact': contact,
                               'subcontacts': subcontacts,
                               'objects': objects,
                               'current_module': module,
                               'attribute': attribute,
                               'types': types,
                               'contact_values': contact_values},
                              context_instance=RequestContext(request), response_format=response_format)
dataset/ETHPy150Open treeio/treeio/treeio/identities/views.py/contact_me/swapped operands of `in`