Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update data source reference (#4993)

boojack9c73b972ae05
diff --git a/frontend/src/components/InstanceForm.vue b/frontend/src/components/InstanceForm.vue
index 2f328daa75..d2e3822ce3 100644
--- a/frontend/src/components/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm.vue
@@ -659,7 +659,7 @@ const getDataSourceWithType = (type: DataSourceType) =>
// We only support one admin data source and one read-only data source.
const adminDataSource = ref<EditDataSource>({
- ...(getDataSourceWithType("ADMIN") || unknown("DATA_SOURCE")),
+ ...cloneDeep(getDataSourceWithType("ADMIN") || unknown("DATA_SOURCE")),
updatedPassword: "",
useEmptyPassword: false,
});
@@ -667,7 +667,7 @@ const adminDataSource = ref<EditDataSource>({
const readonlyDataSource = ref<EditDataSource | undefined>(
getDataSourceWithType("RO")
? ({
- ...getDataSourceWithType("RO"),
+ ...cloneDeep(getDataSourceWithType("RO")),
updatedPassword: "",
useEmptyPassword: false,
} as EditDataSource)
@@ -693,10 +693,8 @@ const isCreating = computed(() => props.instance === undefined);
onMounted(() => {
if (isCreating.value) {
- (adminDataSource.value.host = isDev()
- ? "127.0.0.1"
- : "host.docker.internal"),
- (adminDataSource.value.options.srv = false);
+ adminDataSource.value.host = isDev() ? "127.0.0.1" : "host.docker.internal";
+ adminDataSource.value.options.srv = false;
adminDataSource.value.options.authenticationDatabase = "";
}
});