From 50c21c9b5befef51f21f93e183c3357ad5e783b0 Mon Sep 17 00:00:00 2001 From: Tiina Turban Date: Wed, 3 Jan 2024 14:37:48 +0100 Subject: [PATCH] chore: Make plugin-server ignore deleted plugin configs (#18444) --- plugin-server/src/utils/db/sql.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-server/src/utils/db/sql.ts b/plugin-server/src/utils/db/sql.ts index 202f7f4ece5eb..c4e0f378fa766 100644 --- a/plugin-server/src/utils/db/sql.ts +++ b/plugin-server/src/utils/db/sql.ts @@ -21,7 +21,9 @@ function pluginConfigsInForceQuery(specificField?: keyof PluginConfig): string { LEFT JOIN posthog_organization ON posthog_organization.id = posthog_team.organization_id LEFT JOIN posthog_plugin ON posthog_plugin.id = posthog_pluginconfig.plugin_id WHERE ( - posthog_pluginconfig.enabled='t' AND posthog_organization.plugins_access_level > 0 + posthog_pluginconfig.enabled='t' + AND (posthog_pluginconfig.deleted is NULL OR posthog_pluginconfig.deleted!='t') + AND posthog_organization.plugins_access_level > 0 )` }