Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Ensure that opt in flags are not sent in payload if flag is off

Joshen Lim9d2093ee9cb2
diff --git a/studio/components/interfaces/Organization/GeneralSettings/GeneralSettings.tsx b/studio/components/interfaces/Organization/GeneralSettings/GeneralSettings.tsx
index 1c788f31ac4..4a8c4b34bf2 100644
--- a/studio/components/interfaces/Organization/GeneralSettings/GeneralSettings.tsx
+++ b/studio/components/interfaces/Organization/GeneralSettings/GeneralSettings.tsx
@@ -47,7 +47,7 @@ const GeneralSettings = () => {
const response = await patch(`${API_URL}/organizations/${slug}`, {
name: values.name,
billing_email: ui.selectedOrganization?.billing_email ?? '',
- opt_in_tags: optInTags,
+ ...(allowCMDKDataOptIn && { opt_in_tags: optInTags }),
})
if (response.error) {