From 5548776cdefdf9f785bb2e76589b9a57cac4eff1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 25 Feb 2022 15:36:20 +0800 Subject: [PATCH] =?UTF-8?q?inm=20=E5=85=A5=E5=BA=93bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/inm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/inm/services.py b/hb_server/apps/inm/services.py index 3bff1ac..c9fbbeb 100644 --- a/hb_server/apps/inm/services.py +++ b/hb_server/apps/inm/services.py @@ -22,8 +22,8 @@ class InmService: defaults={'material':material, 'warehouse':warehouse, 'count':0, 'batch':i.batch}) o2.count = o2.count + i.count o2.save() - - iv = Inventory.objects.get_or_create(material=material, warehouse=warehouse, \ + + iv, _= Inventory.objects.get_or_create(material=material, warehouse=warehouse, \ defaults={'material':material, 'warehouse':warehouse, 'count':0}) iv.count = MaterialBatch.objects.filter(material=material, warehouse=warehouse).count() iv.save()