From 131211e604bed58b719f6f017d44d0fbb68d15b8 Mon Sep 17 00:00:00 2001 From: Marijn Dee Date: Fri, 21 Dec 2018 09:42:28 +0100 Subject: [PATCH] Fixed the unit tests --- .../src/Cloud/Models/CloudClusterPrintJobStatus.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrintJobStatus.py b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrintJobStatus.py index 5b7ef7c18a..b1672f362e 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrintJobStatus.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrintJobStatus.py @@ -76,11 +76,17 @@ class CloudClusterPrintJobStatus(BaseCloudModel): self.uuid = uuid self.deleted_at = deleted_at self.printed_on_uuid = printed_on_uuid - self.configuration_changes_required = self.parseModels(CloudClusterPrintJobConfigurationChange, - configuration_changes_required) + if configuration_changes_required: + self.configuration_changes_required = self.parseModels(CloudClusterPrintJobConfigurationChange, + configuration_changes_required) + else: + self.configuration_changes_required = [] self.build_plate = self.parseModel(CloudClusterBuildPlate, build_plate) self.compatible_machine_families = compatible_machine_families - self.impediments_to_printing = self.parseModels(CloudClusterPrintJobImpediment, impediments_to_printing) + if impediments_to_printing: + self.impediments_to_printing = self.parseModels(CloudClusterPrintJobImpediment, impediments_to_printing) + else: + self.impediments_to_printing = [] super().__init__(**kwargs)