don't label newly created uuids

feat/vaults
Tomáš Mládek 2022-02-12 22:22:08 +01:00
parent a74e86e70d
commit 75f9282ea2
No known key found for this signature in database
GPG Key ID: 65E225C8B3E2ED8A
1 changed files with 2 additions and 7 deletions

View File

@ -337,12 +337,7 @@ pub async fn put_object(
let address = in_address.try_into().map_err(ErrorBadRequest)?;
let entries_to_add = match &address {
Address::Hash(_) => vec![],
Address::Uuid(uuid) => vec![Entry {
entity: address.clone(),
attribute: LABEL_ATTR.to_string(),
value: EntryValue::String(uuid.to_string()),
}],
Address::Hash(_) | Address::Uuid(_) => vec![],
Address::Attribute(attribute) => vec![Entry {
entity: address.clone(),
attribute: LABEL_ATTR.to_string(),
@ -435,7 +430,7 @@ pub async fn put_object(
}
if let Some(filename) = filename {
let _ = upend_insert_val!(&connection, address, "LBL", filename);
let _ = upend_insert_val!(&connection, address, LABEL_ATTR, filename);
}
Ok((None, Some(address)))