From 3c1319d48f7a9188fdd08973318e3ada9b72a8e1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 7 Apr 2024 19:15:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20material=E5=A2=9E=E5=8A=A0search?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mtm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mtm/views.py b/apps/mtm/views.py index 21aeda45..28f03da0 100644 --- a/apps/mtm/views.py +++ b/apps/mtm/views.py @@ -27,7 +27,7 @@ class MaterialViewSet(CustomModelViewSet): queryset = Material.objects.all() serializer_class = MaterialSerializer filterset_class = MaterialFilter - search_fields = ['name', 'code', 'number', 'specification'] + search_fields = ['name', 'code', 'number', 'specification', 'model'] select_related_fields = ['process'] ordering = ['name', 'model', 'specification', 'type', 'process', 'process__sort', 'sort', 'id', 'number']