mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-07 19:01:17 +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:
1 parent
bd7fef720d
commit
542b4113a1
4 files changed
+46
-7
No files matched your search
@@ -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