fix: material unit 忽略大小写2

This commit is contained in:
caoqianming 2024-03-04 10:37:33 +08:00
parent 9cd5bfc8f9
commit 70b5a4d87e
1 changed files with 2 additions and 3 deletions

View File

@ -61,9 +61,8 @@ def daoru_material(path: str):
'model': model, 'unit__iexact': unit} 'model': model, 'unit__iexact': unit}
if type in [20, 30]: if type in [20, 30]:
filters['process'] = process filters['process'] = process
default = filters default = {'type': type, 'name': name, 'specification': specification,
default['number'] = f'm{type}_{ranstr(6)}' 'model': model, 'unit': unit, 'number': f'm{type}_{ranstr(6)}', 'id': idWorker.get_id()}
default['id'] = idWorker.get_id()
Material.objects.update_or_create( Material.objects.update_or_create(
defaults=default, defaults=default,
**filters **filters