Skip to content

Commit 3b046a4

Browse files
lumpy72006audiodude
authored andcommitted
convert builder_id from byte to string
1 parent 375f666 commit 3b046a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

wp1/web/builders.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ def _create_or_update_builder(wp10db, data, builder_id=None):
7777
# The builder has been updated. Enqueue a task to materialize selections and
7878
# update the current version.
7979
queues.enqueue_materialize(redis, builder_cls, builder, "text/tab-separated-values")
80+
81+
# ensure builder_id is a string not bytes
82+
if isinstance(builder_id, bytes):
83+
builder_id = builder_id.decode("utf-8")
84+
8085
return flask.jsonify({"success": True, "id": builder_id, "items": {}})
8186

8287

0 commit comments

Comments
 (0)