This commit is contained in:
Oliver 2022-02-07 11:35:51 +11:00
parent 2ade14c47b
commit 4f26df3124

View File

@ -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"),