From ba8244964f94178bfbbda74af0266e3368ec3629 Mon Sep 17 00:00:00 2001 From: GeoNetwork opensource <59019313+geonetworkbuild@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:18:23 +0200 Subject: [PATCH] Fix saving UI settings without changes (#8440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jose GarcĂ­a --- .../resources/catalog/js/admin/SystemSettingsController.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web-ui/src/main/resources/catalog/js/admin/SystemSettingsController.js b/web-ui/src/main/resources/catalog/js/admin/SystemSettingsController.js index 937bcd8e89a..47542f48bcc 100644 --- a/web-ui/src/main/resources/catalog/js/admin/SystemSettingsController.js +++ b/web-ui/src/main/resources/catalog/js/admin/SystemSettingsController.js @@ -397,7 +397,11 @@ "../api/ui" + (isUpdate ? "/" + newid : ""), { id: newid, - configuration: isUpdate ? $scope.uiConfiguration.configuration : null + configuration: isUpdate + ? typeof $scope.uiConfiguration.configuration === "string" + ? $scope.uiConfiguration.configuration + : JSON.stringify($scope.uiConfiguration.configuration, null, 2) + : null }, { responseType: "text" } )