File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
views/Connection/ConnectionForm Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ export type SyncSchemaStream = {
28
28
stream : AirbyteStream ;
29
29
config : AirbyteStreamConfiguration ;
30
30
31
+ /**
32
+ * This field is not returned from API and is used to track unique objects
33
+ */
31
34
id : string ;
32
35
} ;
33
36
Original file line number Diff line number Diff line change @@ -140,7 +140,10 @@ const ConnectionForm: React.FC<ConnectionFormProps> = ({
140
140
const onFormSubmit = useCallback (
141
141
async ( values : FormikConnectionFormValues ) => {
142
142
const formValues : ConnectionFormValues = ( connectionValidationSchema . cast (
143
- values
143
+ values ,
144
+ {
145
+ context : { isRequest : true } ,
146
+ }
144
147
) as unknown ) as ConnectionFormValues ;
145
148
146
149
formValues . operations = mapFormPropsToOperation (
Original file line number Diff line number Diff line change @@ -98,7 +98,11 @@ const connectionValidationSchema = yup
98
98
id : yup
99
99
. string ( )
100
100
// This is required to get rid of id fields we are using to detect stream for edition
101
- . strip ( true ) ,
101
+ . when (
102
+ "$isRequest" ,
103
+ ( isRequest : boolean , schema : yup . StringSchema ) =>
104
+ isRequest ? schema . strip ( true ) : schema
105
+ ) ,
102
106
stream : yup . object ( ) ,
103
107
config : yup
104
108
. object ( {
You can’t perform that action at this time.
0 commit comments