Page MenuHomePhabricator

D8402.diff
No OneTemporary

D8402.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
@@ -523,7 +523,21 @@
);
}
let first_item = items[0].clone();
- Ok(Some(first_item))
+ let user_id = first_item
+ .get(USERS_TABLE_PARTITION_KEY)
+ .ok_or(DBItemError {
+ attribute_name: USERS_TABLE_PARTITION_KEY,
+ attribute_value: None,
+ attribute_error: DBItemAttributeError::Missing,
+ })?
+ .as_s()
+ .map_err(|_| DBItemError {
+ attribute_name: USERS_TABLE_PARTITION_KEY,
+ attribute_value: first_item.get(USERS_TABLE_PARTITION_KEY).cloned(),
+ attribute_error: DBItemAttributeError::IncorrectType,
+ })?;
+ let result = self.get_item_from_users_table(user_id).await?;
+ Ok(result.item)
}
Ok(_) => {
info!(

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 1:27 PM (22 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2525736
Default Alt Text
D8402.diff (977 B)

Event Timeline