mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-03 15:52:51 +00:00
Improved error message (#10433)
This commit is contained in:
@@ -285,6 +285,10 @@ class StockItemTestResultSerializer(
|
||||
part__tree_id=stock_item.part.tree_id, part__in=ancestors, key=test_key
|
||||
).first():
|
||||
data['template'] = template
|
||||
else:
|
||||
raise ValidationError({
|
||||
'test': _('No matching test found for this part')
|
||||
})
|
||||
|
||||
if not template:
|
||||
raise ValidationError(_('Template ID or test name must be provided'))
|
||||
|
Reference in New Issue
Block a user