From 1d2f9f09eb09481cb35a7b346d2b9f7a4f8d7c10 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 24 Jan 2024 12:35:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mioviewset=20prefetch=5Frelated=5Ffield?= =?UTF-8?q?s=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/inm/views.py b/apps/inm/views.py index 89c96a3c..9705b52d 100644 --- a/apps/inm/views.py +++ b/apps/inm/views.py @@ -122,6 +122,7 @@ class MIOViewSet(CustomModelViewSet): queryset = MIO.objects.all() select_related_fields = ['create_by', 'belong_dept', 'do_user', 'submit_user', 'supplier', 'order', 'customer', 'pu_order'] + prefetch_related_fields = ['materials'] serializer_class = MIOListSerializer retrieve_serializer_class = MIODetailSerializer filterset_class = MioFilter