Skip to content

Commit

Permalink
flow: fix bug (Model template copy again error) (#801)
Browse files Browse the repository at this point in the history
* flow: fix bug (state filter with tag)

* flow: fix bug (Model template copy again error)

* flow: fix bug (Model template copy again error)

* flow: fix bug (Model template copy again error)

* flow: fix bug (not found rel_model)

* flow: fix bug (Model template copy again error)

* flow: fix bug (Model template copy again error)
  • Loading branch information
ZzIsGod1019 authored Jul 6, 2024
1 parent b52d17d commit 1dee811
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
10 changes: 0 additions & 10 deletions backend/middlewares/flow/src/api/ci/flow_ci_model_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,6 @@ impl FlowCiModelApi {
&ctx.0,
)
.await?;
FlowModelServ::modify_item(
&added_model.id,
&mut FlowModelModifyReq {
rel_model_id: Some(from_model.rel_model_id.clone()),
..Default::default()
},
&funs,
&ctx.0,
)
.await?;
result.insert(from_model.rel_model_id.clone(), added_model);
}
funs.commit().await?;
Expand Down
10 changes: 0 additions & 10 deletions backend/middlewares/flow/src/api/ct/flow_ct_model_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,6 @@ impl FlowCtModelApi {
&ctx.0,
)
.await?;
FlowModelServ::modify_item(
&new_model.id,
&mut FlowModelModifyReq {
rel_model_id: Some(from_model.rel_model_id.clone()),
..Default::default()
},
&funs,
&ctx.0,
)
.await?;
FlowInstServ::batch_update_when_switch_model(
orginal_models.get(&new_model.tag).map(|orginal_model| orginal_model.id.clone()),
&new_model.tag,
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/flow/src/serv/flow_model_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ impl FlowModelServ {
FlowModelAssociativeOperationKind::Copy => {
Self::add_item(
&mut FlowModelAddReq {
rel_model_id: None,
rel_model_id: if rbum_scope_helper::get_scope_level_by_context(&mock_ctx)? != RbumScopeLevelKind::L2 { Some(rel_model_id.to_string()) } else { None },
rel_template_ids: None,
template: rbum_scope_helper::get_scope_level_by_context(&mock_ctx)? != RbumScopeLevelKind::L2,
..rel_model.clone().into()
Expand Down

0 comments on commit 1dee811

Please sign in to comment.