From 8b7789cdb3b6c3f6ef7e7ec7adbbfce91ba3fcf2 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 5 Nov 2020 15:46:42 +1100 Subject: [PATCH] Set the specified location of a build output --- InvenTree/build/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 6634b69cdf..2b2bdecbed 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -594,6 +594,9 @@ class Build(MPTTModel): - 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 allocated_items = output.items_to_install.all() @@ -613,6 +616,7 @@ class Build(MPTTModel): # Ensure that the output is updated correctly output.build = self output.is_building = False + output.location = location output.save()