Skip to content

Commit

Permalink
do not error on empty changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Nov 13, 2024
1 parent d1e2053 commit 8595562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/src/repository/pos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use std::collections::HashSet;
use anyhow::Context;
use diesel::upsert::excluded;
use diesel::{
BoolExpressionMethods, ExpressionMethods, PgConnection, QueryDsl,
RunQueryDsl, SelectableHelper,
BoolExpressionMethods, ExpressionMethods, OptionalEmptyChangesetExtension, PgConnection, QueryDsl, RunQueryDsl, SelectableHelper
};
use orm::bond::BondInsertDb;
use orm::schema::{bonds, pos_rewards, unbonds, validators};
Expand Down Expand Up @@ -195,6 +194,7 @@ pub fn update_validator_metadata(
.set(metadata_change_db)
.filter(validators::namada_address.eq(metadata.address.to_string()))
.execute(transaction_conn)
.optional_empty_changeset()
.context("Failed to update unbonds in db")?;
}
anyhow::Ok(())
Expand Down

0 comments on commit 8595562

Please sign in to comment.