2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 15:10:54 +00:00

Tweak error message (#9985)

This commit is contained in:
Oliver
2025-07-09 11:37:17 +10:00
committed by GitHub
parent 223287b1e1
commit 227be54ff6

View File

@ -1180,10 +1180,12 @@ class Build(
if prevent_on_incomplete and not output.passedAllRequiredTests(
required_tests=required_tests
):
serial = output.serial
raise ValidationError(
_(f'Build output {serial} has not passed all required tests')
)
msg = _('Build output has not passed all required tests')
if serial := output.serial:
msg = _(f'Build output {serial} has not passed all required tests')
raise ValidationError(msg)
for build_item in allocated_items:
# Complete the allocation of stock for that item