@login_required
def channel_checks(request, code):
    channel = _get_rw_channel_for_user(request, code)
    assigned = set(channel.checks.values_list('code', flat=True).distinct())
    checks = Check.objects.filter(project=channel.project).order_by('created')
    ctx = {'checks': checks, 'assigned': assigned, 'channel': channel}
    return render(request, 'front/channel_checks.html', ctx)
@login_required
def channel_checks(request, code):
    channel = _get_rw_channel_for_user(request, code)
    assigned = set(channel.checks.values_list('code', flat=True).distinct())
    checks = Check.objects.filter(project=channel.project).order_by('created')
    ctx = {'checks': checks, 'assigned': assigned, 'channel': channel}
    return render(request, 'front/channel_checks.html', ctx)