17042 followups (#17122)
Followups after @Weiko review on https://github.com/twentyhq/twenty/pull/17042
This commit is contained in:
+7
-10
@@ -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,
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user