Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: code suggestion

Hemant M Mehta6e77a75ce4db
diff --git a/packages/nc-gui/composables/useAccountSetupStore.ts b/packages/nc-gui/composables/useAccountSetupStore.ts
index 7a8560bcba..1d7b698349 100644
--- a/packages/nc-gui/composables/useAccountSetupStore.ts
+++ b/packages/nc-gui/composables/useAccountSetupStore.ts
@@ -56,19 +56,6 @@ const [useProvideAccountSetupStore, useAccountSetupStore] = createInjectionState
loadingAction.value = Action.Save
try {
- if (activePlugin.value) {
- const testRes = await $api.plugin.test({
- input: JSON.stringify(activePluginFormData.value),
- title: activePlugin.value.title,
- category: activePlugin.value.category,
- } as PluginTestReqType)
-
- if (!testRes) {
- message.error(t('msg.info.invalidCredentials'))
- return
- }
- }
-
await $api.plugin.update(activePlugin.value?.id, {
input: JSON.stringify(activePluginFormData.value),
active: true,
diff --git a/packages/nocodb/src/services/plugins.service.ts b/packages/nocodb/src/services/plugins.service.ts
index 60009d0e4f..709e19f8e2 100644
--- a/packages/nocodb/src/services/plugins.service.ts
+++ b/packages/nocodb/src/services/plugins.service.ts
@@ -7,6 +7,8 @@ import { validatePayload } from '~/helpers';
import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2';
import { Plugin } from '~/models';
+export const isPlayWrightNode = () => process.env.PLAYWRIGHT_TEST === 'true';
+
@Injectable()
export class PluginsService {
constructor(private readonly appHooksService: AppHooksService) {}
@@ -39,7 +41,7 @@ export class PluginsService {
validatePayload('swagger.json#/components/schemas/PluginReq', param.plugin);
const pluginInfo = await Plugin.get(param.pluginId);
- if (pluginInfo?.title && pluginInfo.category) {
+ if (pluginInfo?.title && pluginInfo.category && !isPlayWrightNode()) {
await NcPluginMgrv2.test({
title: pluginInfo.title,
category: pluginInfo.category,