Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sirux88 committed Jan 16, 2023
1 parent 739450d commit 879f879
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/core/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ async fn accept_invite(
err!("User already accepted the invitation")
}

let master_password_required = OrgPolicy::org_is_reset_password_auto_enroll(&org, &mut conn).await;
let master_password_required = OrgPolicy::org_is_reset_password_auto_enroll(org, &mut conn).await;
if data.ResetPasswordKey.is_none() && master_password_required {
err!("Reset password key is required, but not provided.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/db/models/org_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl OrgPolicy {
}

pub async fn org_is_reset_password_auto_enroll(org_uuid: &str, conn: &mut DbConn) -> bool {
match OrgPolicy::find_by_org_and_type(&org_uuid, OrgPolicyType::ResetPassword, conn).await {
match OrgPolicy::find_by_org_and_type(org_uuid, OrgPolicyType::ResetPassword, conn).await {
Some(policy) => match serde_json::from_str::<UpCase<ResetPasswordDataModel>>(&policy.data) {
Ok(opts) => {
return opts.data.AutoEnrollEnabled;
Expand Down

0 comments on commit 879f879

Please sign in to comment.