File tree Expand file tree Collapse file tree
ChatbotBuilderApi.Presentation/Graphs/Ports Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ namespace ChatbotBuilderApi.Presentation.Graphs.Ports;
1212/// <param name="DataType">Data type of the port.</param>
1313public sealed record InputPortModel (
1414 InfoMetaModel Info ,
15- VisualMetaModel Visual ,
15+ VisualMetaModel ? Visual ,
1616 int NodeId ,
1717 DataType DataType ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ namespace ChatbotBuilderApi.Presentation.Graphs.Ports;
1212/// <param name="DataType">Data type of the port.</param>
1313public sealed record OutputPortModel (
1414 InfoMetaModel Info ,
15- VisualMetaModel Visual ,
15+ VisualMetaModel ? Visual ,
1616 int NodeId ,
1717 DataType DataType ) ;
Original file line number Diff line number Diff line change 11using ChatbotBuilderApi . Application . Graphs . Ports . InputPorts ;
22using ChatbotBuilderApi . Application . Graphs . Ports . OutputPorts ;
3+ using ChatbotBuilderApi . Domain . Graphs . ValueObjects . Meta ;
34using ChatbotBuilderApi . Presentation . Graphs . Metas ;
5+ using Newtonsoft . Json . Linq ;
46using Riok . Mapperly . Abstractions ;
57
68namespace ChatbotBuilderApi . Presentation . Graphs . Ports ;
@@ -21,7 +23,7 @@ public static InputPortDto ToDto(this InputPortModel model)
2123 {
2224 return new InputPortDto (
2325 model . Info . ToDomain ( ) ,
24- model . Visual . ToDomain ( ) ,
26+ model . Visual is null ? VisualMeta . Create ( new JObject ( ) ) : model . Visual . ToDomain ( ) ,
2527 model . NodeId ,
2628 model . DataType ) ;
2729 }
@@ -39,7 +41,7 @@ public static OutputPortDto ToDto(this OutputPortModel model)
3941 {
4042 return new OutputPortDto (
4143 model . Info . ToDomain ( ) ,
42- model . Visual . ToDomain ( ) ,
44+ model . Visual is null ? VisualMeta . Create ( new JObject ( ) ) : model . Visual . ToDomain ( ) ,
4345 model . NodeId ,
4446 model . DataType ) ;
4547 }
You can’t perform that action at this time.
0 commit comments