fix(core): Handle zero execution statistics on metrics collection during license renewal (#8463)

This commit is contained in:
Iván Ovejero
2024-01-26 17:50:19 +01:00
committed by GitHub
parent 2fba0e8d58
commit db48bdd6d1
2 changed files with 20 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ export class UsageMetricsRepository extends Repository<UsageMetrics> {
`)) as Row[];
const toNumber = (value: string | number) =>
typeof value === 'number' ? value : parseInt(value, 10);
(typeof value === 'number' ? value : parseInt(value, 10)) || 0;
return {
enabledUsers: toNumber(enabledUsers),