Skip to content

Commit

Permalink
fix id
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Dec 2, 2024
1 parent 786348d commit 5e04d91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/torii/libp2p/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ impl<P: Provider + Sync> Relay<P> {
let model_id = ty_model_id(&ty).unwrap();

// select only identity field, if doesn't exist, empty string
let query =
format!("SELECT identity FROM [{}] WHERE id = ?", ty.name());
let query = format!(
"SELECT identity FROM [{}] WHERE internal_id = ?",
ty.name()
);
let entity_identity: Option<String> = match sqlx::query_scalar(&query)
.bind(format!("{:#x}", entity_id))
.fetch_optional(&mut *pool)
Expand Down

0 comments on commit 5e04d91

Please sign in to comment.