Skip to content

Commit

Permalink
feat: removed dashboard uuid is all cases be it duplicate, empty or s…
Browse files Browse the repository at this point in the history
…omevalid, 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
  • Loading branch information
SagarRajput-7 authored Nov 15, 2024
1 parent 371224a commit c1478c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c1478c4

Please sign in to comment.