diff --git a/apps/inm/services.py b/apps/inm/services.py index e66493c5..368205f9 100644 --- a/apps/inm/services.py +++ b/apps/inm/services.py @@ -165,7 +165,7 @@ def do_in(item: MIOItem): else: raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不足') - wm_production_dept = wm.mgroup.belong_dept if wm.mgroup else None + wm_production_dept = wm.mgroup.belong_dept if wm.mgroup else wm.belong_dept if production_dept is None: production_dept = wm_production_dept elif wm_production_dept and production_dept != wm_production_dept: