Skip to content

Commit

Permalink
fix(groups): unable to delete groups
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjoehnk committed Sep 26, 2024
1 parent c314d72 commit c9b97fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/components/fixtures/commands/src/delete_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ impl<'a> Command<'a> for DeleteGroupCommand {
.delete_group(self.id)
.ok_or_else(|| anyhow::anyhow!("Unknown group {}", self.id))?;

let path = pipeline
.find_node_path::<GroupNode>(|node| node.id == self.id)
let paths = pipeline
.find_node_paths::<GroupNode>(|node| node.id == self.id)
.into_iter()
.cloned()
.ok_or_else(|| anyhow::anyhow!("Missing node for group {}", self.id))?;
.collect::<Vec<_>>();

let sub_cmd = DeleteNodesCommand { paths: vec![path] };
let sub_cmd = DeleteNodesCommand { paths };
let (_, state) = delete_node_runner.apply(sub_cmd)?;

Ok(((), (group, state)))
Expand Down

0 comments on commit c9b97fe

Please sign in to comment.