mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
bug fix
This commit is contained in:
parent
2ade14c47b
commit
4f26df3124
@ -499,7 +499,7 @@ class BomItemSerializer(InvenTreeModelSerializer):
|
||||
part = data['part']
|
||||
sub_part = data['sub_part']
|
||||
|
||||
if BomItem.objects.get(part=part, sub_part=sub_part).exists():
|
||||
if BomItem.objects.filter(part=part, sub_part=sub_part).exists():
|
||||
raise serializers.ValidationError({
|
||||
'part': _("Duplicate BOM item already exists"),
|
||||
'sub_part': _("Duplicate BOM items already exists"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user