From 3d01995012ac5194b44315fdb8361b1840683827 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 23 Feb 2022 10:35:39 +0800 Subject: [PATCH] =?UTF-8?q?sam=20pack=20remark=20=E5=8F=AF=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/sam/views_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hb_server/apps/sam/views_sale.py b/hb_server/apps/sam/views_sale.py index f64aefe..5b2c95c 100644 --- a/hb_server/apps/sam/views_sale.py +++ b/hb_server/apps/sam/views_sale.py @@ -188,7 +188,7 @@ class SaleProductViewSet(ListModelMixin, DestroyModelMixin, CreateModelMixin, Ge serializer.is_valid(raise_exception=True) vdata = serializer.validated_data obj.packnum = vdata['packnum'] - obj.remark = vdata['remark'] + obj.remark = vdata.get('remark', '') for i in vdata['detail']: pi = i['id'] pi.count = i['count']