From 0b0e223be48b893bb8d3776380830cae26b1e30e Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:46:50 -0500 Subject: [PATCH] fix: update flag with no metadata (#3791) Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- go.work.sum | 1 + ui/src/app/flags/flagsApi.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/go.work.sum b/go.work.sum index 4703ed20d..8b513af52 100644 --- a/go.work.sum +++ b/go.work.sum @@ -2161,6 +2161,7 @@ golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbht golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/ui/src/app/flags/flagsApi.ts b/ui/src/app/flags/flagsApi.ts index ae9e775d8..5ec394a07 100644 --- a/ui/src/app/flags/flagsApi.ts +++ b/ui/src/app/flags/flagsApi.ts @@ -93,7 +93,7 @@ export const flagsApi = createApi({ query({ namespaceKey, flagKey, values }) { const update = { defaultVariantId: values.defaultVariant?.id || null, - metadata: values.metadata || [], + metadata: values.metadata || undefined, ...values }; delete update.defaultVariant;