Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions crates/router/src/core/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1622,18 +1622,18 @@ pub async fn update_default_routing_config_for_profile(
let db = state.store.as_ref();
let key_manager_state = &(&state).into();

let business_profile = core_utils::validate_and_get_business_profile(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check where else this function is being used in routing and make changes there as well ?

db,
key_manager_state,
merchant_context.get_merchant_key_store(),
Some(&profile_id),
merchant_context.get_merchant_account().get_id(),
)
.await?
.get_required_value("Profile")
.change_context(errors::ApiErrorResponse::ProfileNotFound {
id: profile_id.get_string_repr().to_owned(),
})?;
let business_profile = db
.find_business_profile_by_merchant_id_profile_id(
key_manager_state,
merchant_context.get_merchant_key_store(),
merchant_context.get_merchant_account().get_id(),
&profile_id,
)
.await
.change_context(errors::ApiErrorResponse::ProfileNotFound {
id: profile_id.get_string_repr().to_owned(),
})?;

let default_config = helpers::get_merchant_default_config(
db,
business_profile.get_id().get_string_repr(),
Expand Down
Loading