From ebf3bbe257b15d05b25c9ed1684728077755a3ce Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 11 Oct 2024 15:54:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20get=5Ffrom=5Fmb=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cm/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/cm/views.py b/apps/cm/views.py index 2ed04daa..4c980a7a 100644 --- a/apps/cm/views.py +++ b/apps/cm/views.py @@ -34,4 +34,6 @@ class LableMatViewSet(CustomListModelMixin, RetrieveModelMixin, CustomGenericVie "supplier": mb.supplier } ) - return Response({"label": f"mat:{obj.id}"}) \ No newline at end of file + rdata = LabelMatSerializer(obj).data + rdata["code_label"] = f"mat:{obj.id}" + return Response(rdata) \ No newline at end of file