@one_perm_required_or_403(pr_project_private_perm,
    (Project, 'slug__exact', 'project_slug'), anonymous_access=True)
def release_detail(request, project_slug, release_slug):
    release = get_object_or_404(Release, slug=release_slug,
        project__slug=project_slug)
    resources = Resource.objects.select_related('project',
        'source_language').filter(releases=release, project__private=False
        ).order_by('project__name')
    source_languages = set()
    for resource in resources:
        source_languages.add(resource.source_language)
    if (None, AnonymousUser()) in request.user:
        private_resources = []
    else:
        private_resources = Resource.objects.select_related('project',
            'source_language').for_user(request.user).filter(
            releases=release, project__private=True
            ).order_by('project__name').distinct()
    if not len(source_languages) == 1:
        source_languages = ()

    statslist = RLStats.objects.select_related('language', 'last_committer'
        ).for_user(request.user).by_release_aggregated(release)

    return render_to_response('projects/release_detail.html', {
        'release': release,
        'alldata_slug': RELEASE_ALL_DATA['slug'],
        'project': release.project,
        'resources': resources,
        'private_resources': private_resources,
        'source_languages' : source_languages,
        'statslist': statslist,
    }, context_instance=RequestContext(request))
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/releases/views.py/release_detail/swapped operands of `in`