Skip to content

Commit

Permalink
fix: ignore geometry when sending deleted updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyhamm committed Dec 12, 2024
1 parent 794d87e commit 50af956
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/sdf-server/src/service/diagram/delete_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub async fn delete_components(

let mut components = HashMap::new();
let mut socket_map = HashMap::new();
let mut socket_map_head = HashMap::new();
for component_id in request.component_ids {
let component: Component = Component::get_by_id(&ctx, component_id).await?;
let incoming_connections = component.incoming_connections(&ctx).await?.clone();
Expand All @@ -70,7 +71,7 @@ pub async fn delete_components(
// to_delete=True
let component: Component = Component::get_by_id(&ctx, component_id).await?;
let payload = component
.into_frontend_type_for_default_view(&ctx, ChangeStatus::Deleted, &mut socket_map)
.into_frontend_type(&ctx, None, ChangeStatus::Deleted, &mut socket_map)
.await?;
WsEvent::component_updated(&ctx, payload)
.await?
Expand All @@ -80,10 +81,11 @@ pub async fn delete_components(
let component: Component =
Component::get_by_id(&base_change_set_ctx, component_id).await?;
let payload = component
.into_frontend_type_for_default_view(
.into_frontend_type(
&base_change_set_ctx,
None,
ChangeStatus::Deleted,
&mut socket_map,
&mut socket_map_head,
)
.await?;
WsEvent::component_updated(&ctx, payload)
Expand Down

0 comments on commit 50af956

Please sign in to comment.