Skip to content

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

Don’t fetch remote info in ProvideInstanceContext if creating new instance

天舟33efccfe2161
diff --git a/frontend/src/components/ProvideInstanceContext.vue b/frontend/src/components/ProvideInstanceContext.vue
index 3bf3d1ac01..2da4590eab 100644
--- a/frontend/src/components/ProvideInstanceContext.vue
+++ b/frontend/src/components/ProvideInstanceContext.vue
@@ -17,15 +17,17 @@ export default {
async setup(props) {
const store = useStore();
- await store.dispatch(
- "database/fetchDatabaseListByInstanceId",
- idFromSlug(props.instanceSlug)
- );
- // This depends on database/fetchDatabaseListByInstanceId to convert its database id to database object.
- await store.dispatch(
- "dataSource/fetchDataSourceListByInstanceId",
- idFromSlug(props.instanceSlug)
- );
+ if (props.instanceSlug.toLowerCase() != "new") {
+ await store.dispatch(
+ "database/fetchDatabaseListByInstanceId",
+ idFromSlug(props.instanceSlug)
+ );
+ // This depends on database/fetchDatabaseListByInstanceId to convert its database id to database object.
+ await store.dispatch(
+ "dataSource/fetchDataSourceListByInstanceId",
+ idFromSlug(props.instanceSlug)
+ );
+ }
},
};
</script>