mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-09 21:30:54 +00:00
Fix error message (#10129)
This commit is contained in:
@@ -580,9 +580,17 @@ class BuildOutputCompleteSerializer(serializers.Serializer):
|
|||||||
and not stock_item.passedAllRequiredTests()
|
and not stock_item.passedAllRequiredTests()
|
||||||
):
|
):
|
||||||
serial = stock_item.serial
|
serial = stock_item.serial
|
||||||
errors.append(
|
|
||||||
_(f'Build output {serial} has not passed all required tests')
|
if serial:
|
||||||
)
|
errors.append(
|
||||||
|
_(
|
||||||
|
f'Build output {serial} has not passed all required tests'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
errors.append(
|
||||||
|
_('Build output has not passed all required tests')
|
||||||
|
)
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
raise ValidationError(errors)
|
raise ValidationError(errors)
|
||||||
|
Reference in New Issue
Block a user