diff --git a/InvenTree/InvenTree/helpers.py b/InvenTree/InvenTree/helpers.py index f4e8f8b2e9..a34199d38c 100644 --- a/InvenTree/InvenTree/helpers.py +++ b/InvenTree/InvenTree/helpers.py @@ -176,7 +176,7 @@ def ExtractSerialNumbers(serials, expected_quantity): else: numbers.append(n) except ValueError: - print("Invalid group: {g}".format(g=group)) + errors.append("Invalid group: {g}".format(g=group)) if len(errors) > 0: raise ValidationError(errors) diff --git a/InvenTree/part/templates/part/partial_delete.html b/InvenTree/part/templates/part/partial_delete.html index b6516057bb..7b51bf2e89 100644 --- a/InvenTree/part/templates/part/partial_delete.html +++ b/InvenTree/part/templates/part/partial_delete.html @@ -16,12 +16,12 @@
{% endif %} -{% if part.locations.all|length > 0 %} +{% if part.stock_items.all|length > 0 %}There are {{ part.locations.all|length }} stock entries defined for this part. If you delete this part, the following stock entries will also be deleted: +
There are {{ part.stock_items.all|length }} stock entries defined for this part. If you delete this part, the following stock entries will also be deleted: