File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/services/namespaces/projects/flows Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -105,10 +105,16 @@ def update_nodes(t)
105105 delete_old_nodes ( t , all_nodes . reject { |node | updated_nodes . pluck ( :node ) . pluck ( :id ) . include? ( node . id ) } )
106106 end
107107
108- def update_starting_node ( _t , all_nodes )
108+ def update_starting_node ( t , all_nodes )
109109 starting_node = all_nodes . find { |n | n [ :input ] . id == flow_input . starting_node_id }
110110
111- return nil if starting_node . nil?
111+ if starting_node . nil? && flow_input . starting_node_id . present?
112+ t . rollback_and_return! ServiceResponse . error (
113+ message : 'Starting node not found' ,
114+ error_code : :node_not_found
115+ )
116+ end
117+ return if starting_node . nil?
112118
113119 flow . starting_node = starting_node [ :node ]
114120 end
Original file line number Diff line number Diff line change 55 runtime_function factory : :runtime_function_definition
66 next_node { nil }
77 node_parameters { [ ] }
8- flow factory : :flow
8+ flow
99 end
1010end
You can’t perform that action at this time.
0 commit comments