fix: mlog create 时的bug
This commit is contained in:
parent
72b04ddc7a
commit
05af336180
|
@ -336,7 +336,7 @@ class MlogSerializer(CustomModelSerializer):
|
|||
if wm_in:
|
||||
wm_in = instance.wm_in
|
||||
ddict = {"batch_ofrom": wm_in.batch_ofrom, "material_ofrom": wm_in.material_ofrom}
|
||||
Mlogb.objects.create(**add_dict_2, defaults=ddict)
|
||||
Mlogb.objects.get_or_create(**add_dict_2, defaults=ddict)
|
||||
return instance
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
|
|
Loading…
Reference in New Issue