17042 followups (#17122)

Followups after @Weiko review on
https://github.com/twentyhq/twenty/pull/17042
This commit is contained in:
Raphaël Bosi
2026-01-13 17:25:30 +01:00
committed by GitHub
parent 869a0a7cf4
commit f793faae2b
4 changed files with 66 additions and 18 deletions
@@ -69,17 +69,14 @@ export class DashboardToPageLayoutSyncService {
withDeleted: true,
});
for (const dashboard of dashboards) {
if (!isDefined(dashboard.pageLayoutId)) {
continue;
}
const pageLayoutIds = dashboards
.map((dashboard) => dashboard.pageLayoutId)
.filter(isDefined);
await this.pageLayoutService.destroy({
id: dashboard.pageLayoutId,
workspaceId,
isLinkedDashboardAlreadyDestroyed: true,
});
}
await this.pageLayoutService.destroyMany({
ids: pageLayoutIds,
workspaceId,
});
},
);
}