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()