mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-22 04:36:30 +00:00
Improvements for build output completion
- Check if the output is fully allocated (throw error if not) - Reload tables after actions performed
This commit is contained in:
InvenTree
@@ -152,6 +152,10 @@ class BuildOutputSerializer(serializers.Serializer):
|
||||
if not output.is_building:
|
||||
raise ValidationError(_("This build output has already been completed"))
|
||||
|
||||
# The build output must have all tracked parts allocated
|
||||
if not build.isFullyAllocated(output):
|
||||
raise ValidationError(_("This build output is not fully allocated"))
|
||||
|
||||
return output
|
||||
|
||||
class Meta:
|
||||
|
Reference in New Issue
Block a user