Transparent Nulls

This commit is contained in:
2026-03-21 10:29:01 -07:00
parent 302d2acef3
commit c2f4b12e35
2 changed files with 4 additions and 2 deletions

View File

@@ -112,8 +112,8 @@ impl DbFtsIndex {
// Try paths in order, using the first value we find
for path in field.path.as_slice() {
let val = match extractor.query(state, path).await? {
Some(PileValue::Null) | None => continue,
Some(x) => x,
None => continue,
};
let val = val_to_string(state, &val, path, field_name).await?;

View File

@@ -67,7 +67,9 @@ impl CliCmd for ItemCommand {
.query(&state, path)
.await
.with_context(|| format!("while extracting field {name}"))?;
if let Some(v) = v {
if let Some(v) = v
&& !matches!(v, PileValue::Null)
{
let j = v
.to_json(&state)
.await