diff --git a/backend/src/baserow/contrib/automation/nodes/models.py b/backend/src/baserow/contrib/automation/nodes/models.py index 84bd88b39e..d41cc5cb48 100644 --- a/backend/src/baserow/contrib/automation/nodes/models.py +++ b/backend/src/baserow/contrib/automation/nodes/models.py @@ -127,10 +127,12 @@ def get_parent_nodes(self): the current node instance. """ + previous_positions = self.workflow.get_graph().get_previous_positions(self) + if previous_positions is None: + return [] + return [ - position[0] - for position in self.workflow.get_graph().get_previous_positions(self) - if position[1] == "child" + position[0] for position in previous_positions if position[1] == "child" ] def get_next_nodes( diff --git a/backend/src/baserow/contrib/automation/nodes/service.py b/backend/src/baserow/contrib/automation/nodes/service.py index bad1be30cb..013344d9ba 100644 --- a/backend/src/baserow/contrib/automation/nodes/service.py +++ b/backend/src/baserow/contrib/automation/nodes/service.py @@ -418,6 +418,9 @@ def replace_node( workflow.simulate_until_node = None workflow.save(update_fields=["simulate_until_node"]) + cache_key = WORKFLOW_DIRTY_CACHE_KEY.format(workflow.id) + global_cache.update(cache_key, lambda _: True) + automation_node_deleted.send( self, workflow=workflow, diff --git a/changelog/entries/unreleased/bug/fix_broken_workflow_after_node_replacement.json b/changelog/entries/unreleased/bug/fix_broken_workflow_after_node_replacement.json new file mode 100644 index 0000000000..7bd3eff43a --- /dev/null +++ b/changelog/entries/unreleased/bug/fix_broken_workflow_after_node_replacement.json @@ -0,0 +1,9 @@ +{ + "type": "bug", + "message": "Fix broken workflow after node replacement", + "issue_origin": "github", + "issue_number": null, + "domain": "automation", + "bullet_points": [], + "created_at": "2026-05-05" +} \ No newline at end of file diff --git a/web-frontend/modules/automation/pages/automationWorkflow.vue b/web-frontend/modules/automation/pages/automationWorkflow.vue index 678cde5fd9..c3f44d805f 100644 --- a/web-frontend/modules/automation/pages/automationWorkflow.vue +++ b/web-frontend/modules/automation/pages/automationWorkflow.vue @@ -88,10 +88,6 @@ const { data: pageData, error } = await useAsyncData( workflowId: workflowId.value, }) - await $store.dispatch('automationHistory/fetchWorkflowHistory', { - workflowId: workflowId.value, - }) - await $store.dispatch('automationWorkflowNode/fetch', { workflow, })