Skip to content

Commit 3a4e03e

Browse files
authored
[dashboard] fix dashboard references lost when dashboard updated from listing page (#241381)
Closes #241350 `update` endpoint does not support partial updates. This PR is as small as possible to resolve the regression by passing full state when updating dashboard state from listing page. Other `update` endpoint issues can be tracked in #241380.
1 parent 73ebda9 commit 3a4e03e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/platform/plugins/shared/dashboard/public/services/dashboard_content_management_service/lib/update_dashboard_meta.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ export const updateDashboardMeta = async ({
3838
await contentManagementService.client.update<DashboardUpdateIn, DashboardUpdateOut>({
3939
contentTypeId: DASHBOARD_CONTENT_ID,
4040
id,
41-
data: { title, description, tags },
42-
options: { references: [] },
41+
data: { ...dashboard.attributes, title, description, tags },
42+
options: {
43+
references: dashboard.references,
44+
/** perform a "full" update instead, where the provided attributes will fully replace the existing ones */
45+
mergeAttributes: false,
46+
},
4347
});
4448

4549
getDashboardContentManagementCache().deleteDashboard(id);

0 commit comments

Comments
 (0)