decode valueless entires as NaN
since NaN == NULL in SQLite, apparently
This commit is contained in:
parent
164cdcd105
commit
5051ac25c6
1 changed files with 5 additions and 3 deletions
|
@ -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),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue