From aac004cd2bee5fe0b6b88a237ae526e532ff74dd Mon Sep 17 00:00:00 2001 From: Chris ter Beke Date: Thu, 25 Feb 2021 12:20:32 +0100 Subject: [PATCH] Fix case where constraints is None --- .../src/Models/Http/ClusterPrintJobStatus.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py index e818da45b1..987ca9fab1 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py @@ -74,10 +74,9 @@ class ClusterPrintJobStatus(BaseModel): printer :param preview_url: URL to the preview image (same as wou;d've been included in the ufp). """ - self.assigned_to = assigned_to self.configuration = self.parseModels(ClusterPrintCoreConfiguration, configuration) - self.constraints = self.parseModel(ClusterPrintJobConstraints, constraints) + self.constraints = self.parseModel(ClusterPrintJobConstraints, constraints) if constraints else None self.created_at = created_at self.force = force self.last_seen = last_seen @@ -94,7 +93,6 @@ class ClusterPrintJobStatus(BaseModel): self.deleted_at = deleted_at self.printed_on_uuid = printed_on_uuid self.preview_url = preview_url - self.configuration_changes_required = self.parseModels(ClusterPrintJobConfigurationChange, configuration_changes_required) \ if configuration_changes_required else []