From 770adb2c020b16d38d35e3aedc61190fc925b978 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 3 Dec 2021 13:36:06 +0100 Subject: [PATCH] Don't store None as capabilities, but empty list This makes a few things easier. You could see None as being a signalling value to indicate that we don't know capabilities, but this signalling would get lost anyway in the serialising to the metadata. So just an empty list is fine for now. Contributes to issue CURA-8671. --- .../UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py index 1676fe1c2e..ce6dd1de4d 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py @@ -37,7 +37,7 @@ class CloudClusterResponse(BaseModel): self.friendly_name = friendly_name self.printer_type = printer_type self.printer_count = printer_count - self.capabilities = capabilities + self.capabilities = capabilities if capabilities is not None else [] super().__init__(**kwargs) # Validates the model, raising an exception if the model is invalid.