mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-14 03:30:25 +00:00
refac
Co-Authored-By: Zixin Yu <183055163+ivvi0927@users.noreply.github.com>
This commit is contained in:
@@ -711,7 +711,7 @@ def sanitize_data_for_db(obj):
|
||||
# json.dumps is implemented in C and much faster than a Python-level
|
||||
# recursive walk over every leaf string.
|
||||
try:
|
||||
if '\x00' not in json.dumps(obj, ensure_ascii=False):
|
||||
if '\\u0000' not in json.dumps(obj, ensure_ascii=False):
|
||||
return obj
|
||||
except (TypeError, ValueError):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user