Skip to content

Commit 71b6dfd

Browse files
committed
fix: validation flow will have runtime flow id
1 parent cff228a commit 71b6dfd

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

app/models/flow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def to_grpc
5555
flow_id: id,
5656
project_id: project.id,
5757
project_slug: project.slug,
58-
type: flow_type.identifier,
58+
type: flow_type.runtime_identifier,
5959
data_types: [], # TODO: when data types are creatable
6060
disable_reason: disabled_reason,
6161
settings: flow_settings.map(&:to_grpc),

spec/models/flow_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@
4343
end
4444

4545
describe '#to_grpc' do
46+
let(:runtime_flow_type) { create(:runtime_flow_type, identifier: 'RUNTIME_HTTP') }
47+
let(:flow_type) do
48+
create(:flow_type, runtime_flow_type: runtime_flow_type, identifier: 'HTTP')
49+
end
4650
let(:flow) do
4751
create(
4852
:flow,
49-
flow_type: create(:flow_type, identifier: 'HTTP'),
53+
flow_type: flow_type,
5054
signature: '(input: REST_ADAPTER_INPUT): HTTP_RESPONSE',
5155
disabled_reason: 0,
5256
flow_settings: [
@@ -99,7 +103,7 @@
99103
flow_id: flow.id,
100104
project_id: flow.project.id,
101105
project_slug: flow.project.slug,
102-
type: flow.flow_type.identifier,
106+
type: runtime_flow_type.identifier,
103107
signature: flow.signature,
104108
node_functions: [
105109
{

0 commit comments

Comments
 (0)