fix ParticipantRemove view’s get_queryset
This commit is contained in:
parent
603cec8303
commit
5e7143d239
|
@ -6,7 +6,7 @@ from django.urls import reverse
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.generic import DeleteView, FormView, TemplateView
|
||||
from django.contrib import messages
|
||||
from django.db.models import Q, Count
|
||||
from django.db.models import Q
|
||||
from django.views.generic import CreateView, DetailView, ListView, UpdateView
|
||||
from django.http import HttpResponse, Http404
|
||||
from django.utils import timezone
|
||||
|
@ -830,7 +830,7 @@ class ParticipantRemove(StaffRequiredMixin, OnSiteFormMixin, DeleteView):
|
|||
success_url = reverse_lazy('participant-list')
|
||||
|
||||
def get_queryset(self):
|
||||
return Participant.objects.annotate(talk_count=Count('talk')).filter(talk_count=0)
|
||||
return Participant.objects.filter(talk__isnull=True)
|
||||
|
||||
|
||||
@staff_required
|
||||
|
|
Loading…
Reference in New Issue