From 846a5698347deeec724a8acda57ea66b8eba6585 Mon Sep 17 00:00:00 2001 From: Zhymabek Roman <61125068+ZhymabekRoman@users.noreply.github.com> Date: Mon, 16 Dec 2024 01:56:39 +0500 Subject: [PATCH] Enhance boolean label handling Fix #386 --- taskiq/labels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskiq/labels.py b/taskiq/labels.py index bcd7c89..a5cdb05 100644 --- a/taskiq/labels.py +++ b/taskiq/labels.py @@ -18,7 +18,7 @@ class LabelType(enum.IntEnum): LabelType.INT: int, LabelType.STR: str, LabelType.FLOAT: float, - LabelType.BOOL: lambda x: x.lower() == "true", + LabelType.BOOL: lambda x: str(x).lower() == "true", LabelType.BYTES: base64.b64decode, LabelType.ANY: lambda x: x, }