Skip to content

Commit

Permalink
Fix prefetch_related in PatientInvestigationViewSet (#1882)
Browse files Browse the repository at this point in the history
fix investigations list view
  • Loading branch information
sainak authored Feb 10, 2024
1 parent 5a087e1 commit a369fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion care/facility/api/viewsets/patient_investigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PatientInvestigationViewSet(
mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet
):
serializer_class = PatientInvestigationSerializer
queryset = PatientInvestigation.objects.all().select_related("groups")
queryset = PatientInvestigation.objects.all().prefetch_related("groups")
lookup_field = "external_id"
permission_classes = (IsAuthenticated,)
filterset_class = PatientInvestigationFilter
Expand Down

0 comments on commit a369fea

Please sign in to comment.