Fixed decoding
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-12-13 02:34:52 +01:00
parent 15ffe4ce08
commit 08f7caeeec

View File

@ -95,8 +95,11 @@ class AssignmentView(FlaskView):
target = redis_client.get(key) target = redis_client.get(key)
if target: if target:
name = key[10:] name = key[10:]
current_scheduling_table[name] = target current_scheduling_table[name] = target.decode('utf-8')
default_target = redis_client.get('DEFAULT:SCHEDULED') 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}) return jsonify({"scheduling_table": current_scheduling_table, "default_target": default_target})