From c1478c4e5417860caad265a6ffa64088042f9ae8 Mon Sep 17 00:00:00 2001 From: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:35:29 +0530 Subject: [PATCH] feat: removed dashboard uuid is all cases be it duplicate, empty or somevalid, while import json (#6448) * feat: removed dashboard uuid is all cases be it duplicate, empty or somevalid, while import json * feat: added comment to better explain the logic --- frontend/src/container/ListOfDashboard/ImportJSON/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx index 6926db85be..eb595c204d 100644 --- a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx +++ b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx @@ -82,9 +82,8 @@ function ImportJSON({ const dashboardData = JSON.parse(editorValue) as DashboardData; - // Add validation for uuid - if (dashboardData.uuid !== undefined && dashboardData.uuid.trim() === '') { - // silently remove uuid if it is empty + // Remove uuid from the dashboard data, in all cases - empty, duplicate or any valid not duplicate uuid + if (dashboardData.uuid !== undefined) { delete dashboardData.uuid; }