Fix empty variable
This commit is contained in:
@@ -377,7 +377,7 @@ if cands:
|
|||||||
else:
|
else:
|
||||||
print('', end='')
|
print('', end='')
|
||||||
PY
|
PY
|
||||||
<<<"$json")"
|
<<<"$json")" || id=""
|
||||||
# Fallback: if the list contains exactly one KB, use its id
|
# Fallback: if the list contains exactly one KB, use its id
|
||||||
if [ -z "$id" ]; then
|
if [ -z "$id" ]; then
|
||||||
id="$(printf '%s' "$json" | python3 - <<'PY'
|
id="$(printf '%s' "$json" | python3 - <<'PY'
|
||||||
@@ -393,7 +393,7 @@ if isinstance(items, list) and len(items)==1:
|
|||||||
else:
|
else:
|
||||||
print('', end='')
|
print('', end='')
|
||||||
PY
|
PY
|
||||||
)"
|
)" || id=""
|
||||||
fi
|
fi
|
||||||
if [ -n "$id" ]; then
|
if [ -n "$id" ]; then
|
||||||
echo "[owui] resolved id for \"$name\": $id"
|
echo "[owui] resolved id for \"$name\": $id"
|
||||||
|
Reference in New Issue
Block a user