Skip to content

Commit

Permalink
iam: fix bug (#743)
Browse files Browse the repository at this point in the history
* flow: support async modify field action

* iam: fix bug
  • Loading branch information
ZzIsGod1019 authored May 22, 2024
1 parent 0172030 commit 554d883
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/middlewares/flow/src/serv/flow_event_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ impl FlowEventServ {
&& change_info.changed_val.clone().unwrap().as_object().unwrap().get("value").is_some()
&& change_info.changed_val.clone().unwrap().as_object().unwrap().get("op").is_some()
{
let original_value = if let Some(original_value) = FlowInstServ::find_var_by_inst_id(flow_inst_id, &change_info.var_name, funs, ctx).await?
let original_value = if let Some(original_value) = FlowInstServ::find_var_by_inst_id(flow_inst_id, &format!("custom_{}", change_info.var_name), funs, ctx).await?
{
Some(original_value)
} else {
FlowInstServ::find_var_by_inst_id(flow_inst_id, &format!("custom_{}", change_info.var_name), funs, ctx).await?
FlowInstServ::find_var_by_inst_id(flow_inst_id, &change_info.var_name, funs, ctx).await?
};

let target_value = change_info.changed_val.clone().unwrap().as_object().unwrap().get("value").unwrap().as_i64().unwrap_or_default();
Expand Down
4 changes: 2 additions & 2 deletions backend/supports/iam/src/iam_enumeration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ impl IamAccountLockStateKind {
match self {
IamAccountLockStateKind::Unlocked => 0,
IamAccountLockStateKind::PasswordLocked => 1,
IamAccountLockStateKind::ManualLocked => 2,
IamAccountLockStateKind::LongTimeNoLoginLocked => 3,
IamAccountLockStateKind::LongTimeNoLoginLocked => 2,
IamAccountLockStateKind::ManualLocked => 3,
}
}
}
Expand Down

0 comments on commit 554d883

Please sign in to comment.