server
This commit is contained in:
parent
8dc939d761
commit
d98819b569
12 changed files with 157 additions and 161 deletions
|
|
@ -123,7 +123,15 @@ fn insert_feature_value(
|
|||
return;
|
||||
}
|
||||
|
||||
let value = state.data.get_feature(row, feat_idx);
|
||||
// `get_feature` decodes the lossy u16-quantized value, which turns round
|
||||
// sale prices into noise (e.g. £428,000 → £427,984). For the last sale we
|
||||
// keep an unquantized copy, so serve that instead to match the exact
|
||||
// `historical_prices` entries and the price-history chart.
|
||||
let value = if feature_names[feat_idx] == "Last known price" {
|
||||
state.data.last_known_price_raw(row)
|
||||
} else {
|
||||
state.data.get_feature(row, feat_idx)
|
||||
};
|
||||
if value.is_finite() {
|
||||
features.insert(feature_names[feat_idx].clone(), value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue