Skip to content

Commit

Permalink
πŸ› distinct got dropped from rest_framework compat
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Sep 17, 2024
1 parent a249e16 commit 56323f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions froide_campaign/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from django.db import models

from rest_framework import filters
from rest_framework.compat import distinct

from .models import InformationObject

Expand Down Expand Up @@ -126,7 +125,8 @@ def _orm_filter_queryset(self, request, queryset, view):
)

if self.must_call_distinct(queryset, search_fields):
queryset = distinct(queryset, base)
queryset = queryset.filter(pk=models.OuterRef("pk"))
queryset = base.filter(models.Exists(queryset))
return queryset


Expand Down

0 comments on commit 56323f4

Please sign in to comment.