Skip to content

Commit

Permalink
Merge pull request #213 from open-zaak/feature/optimize_db_queries_fo…
Browse files Browse the repository at this point in the history
…r_zaken

optimize db queries - part 3 (zaken component)
  • Loading branch information
sergei-maertens committed Nov 11, 2019
2 parents af3e5f4 + c553d71 commit c73febe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openzaak/components/zaken/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class ZaakEigenschapViewSet(
Een specifieke ZAAKEIGENSCHAP opvragen.
"""

queryset = ZaakEigenschap.objects.all()
queryset = ZaakEigenschap.objects.select_related("zaak", "eigenschap").all()
serializer_class = ZaakEigenschapSerializer
permission_classes = (ZaakNestedAuthRequired,)
lookup_field = "uuid"
Expand Down Expand Up @@ -579,7 +579,7 @@ class KlantContactViewSet(
Een specifiek KLANTCONTACT bij een ZAAK opvragen.
"""

queryset = KlantContact.objects.all()
queryset = KlantContact.objects.select_related("zaak").all()
serializer_class = KlantContactSerializer
lookup_field = "uuid"
pagination_class = PageNumberPagination
Expand Down

0 comments on commit c73febe

Please sign in to comment.