Skip to content

Commit

Permalink
fix(admin-statistics): Stop old templateIds causing failures (#16331)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
norda-gunni and kodiakhq[bot] authored Oct 9, 2024
1 parent b81269b commit 2c1d7e4
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@ export class ApplicationAdminStatisticsSerializer
}

async serializeArray(applications: ApplicationsStatistics[], locale: Locale) {
return Promise.all(applications.map((item) => this.serialize(item, locale)))
return (
await Promise.allSettled(
applications.map((item) => this.serialize(item, locale)),
)
)
.filter(
(item): item is PromiseFulfilledResult<Record<string, any>> =>
item.status === 'fulfilled',
)
.map((item) => item.value)
}
}

0 comments on commit 2c1d7e4

Please sign in to comment.