From 618a76c6af8ee0f58d8fd280b818428e014ef60f Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:00:01 +0200 Subject: [PATCH] expect values as 'None' and 'QColor' --- client/ayon_core/tools/utils/lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/tools/utils/lib.py b/client/ayon_core/tools/utils/lib.py index f31bb82e59..250d267e76 100644 --- a/client/ayon_core/tools/utils/lib.py +++ b/client/ayon_core/tools/utils/lib.py @@ -485,7 +485,10 @@ class _IconsCache: parts = [icon_type, icon_def["path"]] elif icon_type in {"awesome-font", "material-symbols"}: - parts = [icon_type, icon_def["name"], icon_def["color"]] + color = icon_def["color"] or "" + if isinstance(color, QtGui.QColor): + color = color.name() + parts = [icon_type, icon_def["name"] or "", color] return "|".join(parts) @classmethod