From bb1efd019d53dfaef955b7935c1671247b9bb702 Mon Sep 17 00:00:00 2001 From: Michael Desa Date: Thu, 1 Aug 2019 11:06:06 -0400 Subject: [PATCH] review(organizations/actions/orgs): avoid mutation of bucket in createOrgWithBucket --- ui/src/organizations/actions/orgs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/organizations/actions/orgs.ts b/ui/src/organizations/actions/orgs.ts index c18036f3b32..595477addee 100644 --- a/ui/src/organizations/actions/orgs.ts +++ b/ui/src/organizations/actions/orgs.ts @@ -186,9 +186,9 @@ export const createOrgWithBucket = ( dispatch(addOrg(createdOrg)) dispatch(push(`/orgs/${createdOrg.id}`)) - bucket.orgID = createdOrg.id - - const bucketResp = await api.postBucket({data: bucket}) + const bucketResp = await api.postBucket({ + data: {...bucket, orgID: createdOrg.id}, + }) if (bucketResp.status !== 201) { throw new Error(bucketResp.data.message)