Skip to content
Snippets Groups Projects
Commit 5924a73e authored by Nicolas80's avatar Nicolas80
Browse files

* Added `debug!` log inside `impl From<DbAccountId> for Value` used to...

* Added `debug!` log inside `impl From<DbAccountId> for Value` used to serialize DbAccountId into the String value for the db
** Can be seen when adding `RUST_LOG=debug ` before the `gcli` command
* Small fix for clippy remark
parent 2cd0a861
No related branches found
No related tags found
1 merge request!43Draft: Resolve "Error: Base 58 requirement is violated"
Pipeline #40216 passed
......@@ -2,6 +2,7 @@ use crate::commands::{cesium, vault};
use crate::runtime_config::AccountId;
use crate::utils::GcliError;
use anyhow::anyhow;
use log::debug;
use sea_orm::entity::prelude::*;
use sea_orm::prelude::async_trait::async_trait;
use sea_orm::prelude::StringLen;
......@@ -162,7 +163,12 @@ impl sea_orm::sea_query::ValueType for DbAccountId {
impl From<DbAccountId> for Value {
fn from(account_id: DbAccountId) -> Self {
Value::String(Some(Box::new(account_id.0.to_string())))
let account_id_string = account_id.0.to_string();
debug!(
"DB converting DbAccountId to string:'{}'",
account_id_string
);
Value::String(Some(Box::new(account_id_string)))
}
}
......@@ -782,7 +788,7 @@ where
.filter(
Condition::any()
.add(Column::Parent.eq(current_account.address.clone()))
.add(Column::Parent.eq(format!("\"{}\"",current_account.address.to_string()))),
.add(Column::Parent.eq(format!("\"{}\"", current_account.address))),
)
.order_by_asc(Column::Address)
.all(db)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment