Commit 79807ae5 authored by Tom van Bussel's avatar Tom van Bussel
Browse files

Only show active partners in API

Previously inactive partners were shown in the API. As the Serializer does not include the is_active
field there was no tell whether a partner was active or not. Now the API only returns active partners.
parent ac8a6df8
......@@ -28,7 +28,7 @@ def _extract_date_range(request):
class PartnerViewset(viewsets.ReadOnlyModelViewSet):
serializer_class = PartnerSerializer
queryset = Partner.objects.all()
queryset = Partner.objects.filter(is_active=True)
@list_route(permission_classes=(IsAuthenticatedOrReadOnly,))
def calendarjs(self, request):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment