Skip to content

Commit

Permalink
console: Set empty server url to existing LoRa Cloud integration entries
Browse files Browse the repository at this point in the history
  • Loading branch information
cvetkovski98 authored and adriansmares committed Nov 10, 2022
1 parent 70420a1 commit 07ab5bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pkg/webui/console/containers/lora-cloud-das-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ const LoRaCloudDASForm = () => {
selectApplicationPackageDefaultAssociation(state, LORA_CLOUD_DAS.DEFAULT_PORT),
)
const packageError = useSelector(selectGetApplicationPackagesError)
const initialValues = validationSchema.cast(defaultAssociation || defaultValues)
const initialValues = validationSchema.cast(
defaultAssociation ? { server_url: '', ...defaultAssociation } : defaultValues,
)

const handleSubmit = useCallback(
async values => {
Expand Down
5 changes: 3 additions & 2 deletions pkg/webui/console/containers/lora-cloud-gls-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ const LoRaCloudGLSForm = () => {
selectApplicationPackageDefaultAssociation(state, LORA_CLOUD_GLS.DEFAULT_PORT),
)
const packageError = useSelector(selectGetApplicationPackagesError)
const initialValues = validationSchema.cast(defaultAssociation || defaultValues)

const initialValues = validationSchema.cast(
defaultAssociation ? { server_url: '', ...defaultAssociation } : defaultValues,
)
const handleSubmit = useCallback(
async values => {
try {
Expand Down

0 comments on commit 07ab5bf

Please sign in to comment.