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:
Oliver committed 2021-10-17 21:37:10 +11:00
1 parent bd7fef720d
commit 542b4113a1
4 files changed
+46 -7

No files matched your search

+4
View File
@@ -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: