Return True for BOM valid flag if part does not have BOM items

This commit is contained in:
eeintech 2021-03-15 10:36:12 -04:00
parent d39bd88440
commit 64a57128bc

View File

@ -1372,7 +1372,7 @@ class Part(MPTTModel):
""" Check if the BOM is 'valid' - if the calculated checksum matches the stored value
"""
return self.get_bom_hash() == self.bom_checksum
return self.get_bom_hash() == self.bom_checksum or not self.has_bom
@transaction.atomic
def validate_bom(self, user):