diff options
author | Remco Burema <r.burema@ultimaker.com> | 2021-12-02 14:22:55 +0300 |
---|---|---|
committer | Remco Burema <r.burema@ultimaker.com> | 2021-12-02 14:22:55 +0300 |
commit | 1253b41537ce94254abccf4b54270e9b23497770 (patch) | |
tree | e7cb9688c308aed0dd9d5d06513da8ae2a247aba /cura/PrinterOutput | |
parent | 95f0b692a646ac88e01fb532b8af8e22dbdcd751 (diff) |
Only perform materials-sync-job for capable printers.
part of CURA-8671
Diffstat (limited to 'cura/PrinterOutput')
-rw-r--r-- | cura/PrinterOutput/UploadMaterialsJob.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cura/PrinterOutput/UploadMaterialsJob.py b/cura/PrinterOutput/UploadMaterialsJob.py index 166b692ea5..7a08a198c1 100644 --- a/cura/PrinterOutput/UploadMaterialsJob.py +++ b/cura/PrinterOutput/UploadMaterialsJob.py @@ -83,6 +83,14 @@ class UploadMaterialsJob(Job): host_guid = "*", # Required metadata field. Otherwise we get a KeyError. um_cloud_cluster_id = "*" # Required metadata field. Otherwise we get a KeyError. ) + + # Filter out any printer not capable of the 'import_material' capability. Needs FW 7.0.1-RC at the least! + self._printer_metadata = [ printer_data for printer_data in self._printer_metadata if ( + UltimakerCloudConstants.META_CAPABILITIES in printer_data and + "import_material" in printer_data[UltimakerCloudConstants.META_CAPABILITIES] + ) + ] + for printer in self._printer_metadata: self._printer_sync_status[printer["host_guid"]] = self.PrinterStatus.UPLOADING.value |