Set the specified location of a build output

This commit is contained in:
Oliver Walters 2020-11-05 15:46:42 +11:00
parent 6c89a2aaeb
commit 8b7789cdb3

View File

@ -594,6 +594,9 @@ class Build(MPTTModel):
- Mark the output as complete - Mark the output as complete
""" """
# Select the location for the build output
location = kwargs.get('location', self.destination)
# List the allocated BuildItem objects for the given output # List the allocated BuildItem objects for the given output
allocated_items = output.items_to_install.all() allocated_items = output.items_to_install.all()
@ -613,6 +616,7 @@ class Build(MPTTModel):
# Ensure that the output is updated correctly # Ensure that the output is updated correctly
output.build = self output.build = self
output.is_building = False output.is_building = False
output.location = location
output.save() output.save()