File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
redisinsight/ui/src/pages/home/components/manual-connection Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,22 @@ const ManualConnectionWrapper = (props: Props) => {
207
207
if ( editMode ) {
208
208
database . id = editedInstance ?. id
209
209
210
- return getFormUpdates ( database , omit ( editedInstance , [ 'id' ] ) )
210
+ const updatedValues = getFormUpdates ( database , omit ( editedInstance , [ 'id' ] ) )
211
+
212
+ // When a new caCert/clientCert is deleted, the editedInstance
213
+ // is not updated with the deletion until 'apply' is
214
+ // clicked. Once the apply is clicked, the editedInstance object
215
+ // that is validated against, still has the older certificates
216
+ // attached. Attaching the new certs to the final object helps.
217
+ if ( values . selectedCaCertName === 'ADD_NEW_CA_CERT' && values . newCaCertName !== '' && values . newCaCertName === editedInstance . caCert ?. name ) {
218
+ updatedValues . caCert = database . caCert
219
+ }
220
+
221
+ if ( values . selectedTlsClientCertId === 'ADD_NEW' && values . newTlsCertPairName !== '' && values . selectedTlsClientCertName === editedInstance . newTlsCertPairName ?. name ) {
222
+ updatedValues . clientCert = database . clientCert
223
+ }
224
+
225
+ return updatedValues
211
226
}
212
227
213
228
return removeEmpty ( database )
You can’t perform that action at this time.
0 commit comments