@handle_response_format
@treeio_login_required
def mlist_delete(request, mlist_id, response_format='html'):
    "Delete mlist page"

    mlist = get_object_or_404(MailingList, pk=mlist_id)
    if not request.user.profile.has_permission(mlist, mode="w"):
        return user_denied(request, message="You don't have access to this Mailing List",
                           response_format=response_format)

    if request.POST:
        if request.POST in 'delete':
            if 'trash' in request.POST:
                mlist.trash = True
                mlist.save()
            else:
                mlist.delete()
            return HttpResponseRedirect('/messaging/')
        elif 'cancel' in request.POST:
            return HttpResponseRedirect(reverse('messaging_mlist_view', args=[mlist.id]))

    context = _get_default_context(request)
    context.update({'mlist': mlist})

    return render_to_response('messaging/mlist_delete', context,
                              context_instance=RequestContext(request),
                              response_format=response_format)
dataset/ETHPy150Open treeio/treeio/treeio/messaging/views.py/mlist_delete/swapped operands of `in`