From 08f7caeeec281406fee0ccd28ef3ce4dd7ae2599 Mon Sep 17 00:00:00 2001 From: marcsello Date: Mon, 13 Dec 2021 02:34:52 +0100 Subject: [PATCH] Fixed decoding --- birb_scheduler_teller/views/assignment_view.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/birb_scheduler_teller/views/assignment_view.py b/birb_scheduler_teller/views/assignment_view.py index 6ff00ec..1dbdcd0 100644 --- a/birb_scheduler_teller/views/assignment_view.py +++ b/birb_scheduler_teller/views/assignment_view.py @@ -95,8 +95,11 @@ class AssignmentView(FlaskView): target = redis_client.get(key) if target: name = key[10:] - current_scheduling_table[name] = target + current_scheduling_table[name] = target.decode('utf-8') default_target = redis_client.get('DEFAULT:SCHEDULED') + if default_target: + default_target = default_target.decode('utf-8') + return jsonify({"scheduling_table": current_scheduling_table, "default_target": default_target})