Transparent Nulls
This commit is contained in:
@@ -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?;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user