From a60c967ea5f0e59c5de2cafc03f6f2757e2d5020 Mon Sep 17 00:00:00 2001 From: Chet Joswig Date: Mon, 30 Oct 2023 09:43:07 -0700 Subject: [PATCH] use more standard style of removing id attr --- src/utilities/effects.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utilities/effects.ts b/src/utilities/effects.ts index 1fba8d0aca..7ff881d4fb 100644 --- a/src/utilities/effects.ts +++ b/src/utilities/effects.ts @@ -3715,15 +3715,11 @@ const effects = { if (!queryPermissions.UPDATE_ACTIVITY_PRESET(user, updatedActivityPreset)) { throwPermissionError('update this activity preset'); } - + const { id: _id, ...restOfPresetPayload } = updatedActivityPreset; const { update_activity_presets_by_pk } = await reqHasura( gql.UPDATE_ACTIVITY_PRESET, { - activityPresetSetInput: { - ...updatedActivityPreset, - id: undefined, - }, - id, + activityPresetSetInput: restOfPresetPayload, }, user, );