itemstore.update() now completely deletes the item. before adding a key, that already existed some time, would not work, also handle_mize_message() returns after one if-statement triggers

This commit is contained in:
Sebastian Moser
2023-01-25 12:27:34 +01:00
parent 188a7b2a7e
commit b5dd705f70
3 changed files with 11 additions and 4 deletions

View File

@@ -124,7 +124,10 @@ impl Itemstore {
if let Some(key_index) = old_keys.iter().position(|x| *x == key.clone()){
old_keys.remove(key_index);
}
tr.del(key).await?;
let mut store_key = update.id.clone().into_bytes();
store_key.push(':' as u8);
store_key.extend(key);
tr.del(store_key).await?;
} else {
tr.set(store_key.clone(), new_val).await?;
}