filter on the correct id
This commit is contained in:
parent
a6e12868b3
commit
387e4c1d87
|
@ -28,6 +28,6 @@ class TokenFindListView(LoginRequiredMixin, ListView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
# find the tokens the user still needs to find
|
# find the tokens the user still needs to find
|
||||||
context['unfound_list'] = Token.objects.all().exclude(id__in=TokenFind.objects.filter(user=self.request.user).values_list('id', flat=True))
|
context['unfound_list'] = Token.objects.all().exclude(id__in=TokenFind.objects.filter(user=self.request.user).values_list('token__id', flat=True))
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue