Skip to content

Commit c74ede6

Browse files
author
ljl
committed
fix
1 parent fffc0ec commit c74ede6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/spi/spi-stats/src/serv/pg/stats_pg_conf_fact_col_serv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(crate) async fn add(fact_conf_key: &str, add_req: &StatsConfFactColAddReq, f
3636
"409-spi-stats-fact-inst-exist",
3737
));
3838
}
39-
let conf_params = if let Some(rel_external_ids) = add_req.rel_external_id {
39+
let conf_params = if let Some(rel_external_ids) = add_req.rel_external_id.clone() {
4040
vec![
4141
Value::from(&add_req.key),
4242
Value::from(fact_conf_key),
@@ -51,7 +51,7 @@ pub(crate) async fn add(fact_conf_key: &str, add_req: &StatsConfFactColAddReq, f
5151
.count_by_sql(
5252
&format!(
5353
"SELECT 1 FROM {table_name} WHERE key = $1 AND rel_conf_fact_key = $2 AND kind =$3 {}",
54-
if let Some(rel_external_id) = &add_req.rel_external_id {
54+
if add_req.rel_external_id.is_some() {
5555
format!("AND rel_external_id IN ($4,$5)")
5656
} else {
5757
"AND rel_external_id = ''".to_string()

0 commit comments

Comments
 (0)