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
This commit is contained in:
SagarRajput-7 2024-11-15 19:35:29 +05:30 committed by GitHub
parent 371224a64a
commit c1478c4e54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}