From 9ce2eb988f5c9d82e30a4244c07165fb8bbd63dc Mon Sep 17 00:00:00 2001 From: Paul R Date: Thu, 28 Apr 2022 11:32:20 +0100 Subject: [PATCH] [#2885] Modify group error messages to be unique --- InvenTree/InvenTree/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/helpers.py b/InvenTree/InvenTree/helpers.py index 675898e3d0..7bd4fd819d 100644 --- a/InvenTree/InvenTree/helpers.py +++ b/InvenTree/InvenTree/helpers.py @@ -488,7 +488,7 @@ def extract_serial_numbers(serials, expected_quantity, next_number: int): for n in range(a, b + 1): add_sn(n) else: - errors.append(_("Invalid group: {g}").format(g=group)) + errors.append(_("Invalid group range: {g}").format(g=group)) except ValueError: errors.append(_("Invalid group: {g}").format(g=group)) @@ -519,7 +519,7 @@ def extract_serial_numbers(serials, expected_quantity, next_number: int): add_sn(n) # no case else: - errors.append(_("Invalid group: {g}").format(g=group)) + errors.append(_("Invalid group sequence: {g}").format(g=group)) # At this point, we assume that the "group" is just a single serial value elif group: