v1.0.98: шаг6 — elements_json double-decode fix
This commit is contained in:
@@ -144,9 +144,15 @@ class Handler(BaseHTTPRequestHandler):
|
||||
if not docs:
|
||||
continue
|
||||
ej = docs[0]["elements_json"]
|
||||
# Lucee JSONB может вернуть: строку, dict-обёртку {Value,Type}, или уже список
|
||||
if isinstance(ej, dict) and "Value" in ej:
|
||||
ej = ej["Value"]
|
||||
if isinstance(ej, str):
|
||||
elements = json.loads(ej)
|
||||
elif isinstance(ej, list):
|
||||
elements = ej
|
||||
else:
|
||||
elements = []
|
||||
# Lucee serializeJSON → UPPERCASE keys, normalize to lowercase
|
||||
elements = [{k.lower(): v for k, v in el.items()} for el in elements]
|
||||
lines = []
|
||||
|
||||
Reference in New Issue
Block a user