decode valueless entires as NaN

since NaN == NULL in SQLite, apparently
feat/vaults
Tomáš Mládek 2022-03-18 22:22:32 +01:00
parent 164cdcd105
commit 5051ac25c6
1 changed files with 5 additions and 3 deletions

View File

@ -50,9 +50,11 @@ impl TryFrom<&models::Entry> for Entry {
value: EntryValue::Number(value_num),
})
} else {
Err(anyhow!(
"Inconsistent database: Both values of entry are NULL!"
))
Ok(Entry {
entity: Address::decode(&e.entity)?,
attribute: e.attribute.clone(),
value: EntryValue::Number(f64::NAN),
})
}
}
}