From 44ea5e329b8e5fe1f038f03d2534394a50ef1a8e Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 21 Jan 2022 15:24:38 -0500 Subject: [PATCH] chore: always delete nested secrets from main payload --- addons/api/addon/serializers/application.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/api/addon/serializers/application.js b/addons/api/addon/serializers/application.js index 6713f0069..6ad34b4d9 100644 --- a/addons/api/addon/serializers/application.js +++ b/addons/api/addon/serializers/application.js @@ -57,9 +57,11 @@ export default class ApplicationSerializer extends RESTSerializer { delete json[key]; } // Push nested secrets down into the secrets key - if (options.isNestedSecret && json[key]) { - if (!json.secrets) json.secrets = {}; - json.secrets[key] = json[key]; + if (options.isNestedSecret) { + if (json[key]) { + if (!json.secrets) json.secrets = {}; + json.secrets[key] = json[key]; + } delete json[key]; } return value;