Fix name of compatibility category

I had the nesting wrong. 'compatibilities' is the nested sub-dict in each of these compatibility entries.

Contributes to issue CURA-8585.
This commit is contained in:
Ghostkeeper 2021-11-30 18:22:34 +01:00
parent cfdb01caaf
commit b854025daa
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -150,7 +150,7 @@ class PackageModel(QObject):
:return: Whether this package provides any material that is compatible with the material station.
"""
for material in subdata.get("materials", []):
for compatibility in material.get("compatibilities", []):
for compatibility in material.get("compatibility", []):
if compatibility.get("material_station_optimized", False):
return True
return False
@ -162,7 +162,7 @@ class PackageModel(QObject):
:return: Whether this package provides any material that is compatible with the air manager.
"""
for material in subdata.get("materials", []):
for compatibility in material.get("compatibilities", []):
for compatibility in material.get("compatibility", []):
if compatibility.get("air_manager_optimized", False):
return True
return False