Page MenuHomePhabricator

D10423.id34911.diff
No OneTemporary

D10423.id34911.diff

diff --git a/services/identity/src/database.rs b/services/identity/src/database.rs
--- a/services/identity/src/database.rs
+++ b/services/identity/src/database.rs
@@ -615,12 +615,10 @@
device_id_key: String,
) -> Result<(), Error> {
let update_expression =
- format!("REMOVE {}.{}", USERS_TABLE_DEVICES_ATTRIBUTE, ":deviceID");
+ format!("REMOVE {}.{}", USERS_TABLE_DEVICES_ATTRIBUTE, "#deviceID");
- let expression_attribute_values = HashMap::from([(
- ":deviceID".to_string(),
- AttributeValue::S(device_id_key),
- )]);
+ let expression_attribute_names =
+ HashMap::from([("#deviceID".to_string(), device_id_key)]);
self
.client
@@ -628,7 +626,7 @@
.table_name(USERS_TABLE)
.key(USERS_TABLE_PARTITION_KEY, AttributeValue::S(user_id))
.update_expression(update_expression)
- .set_expression_attribute_values(Some(expression_attribute_values))
+ .set_expression_attribute_names(Some(expression_attribute_names))
.send()
.await
.map_err(|e| Error::AwsSdk(e.into()))?;

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 2:24 AM (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609415
Default Alt Text
D10423.id34911.diff (1 KB)

Event Timeline