diff --git a/backend/src/agent/brains/szenario.brain.ts b/backend/src/agent/brains/szenario.brain.ts index 70a8b17..07d0f3f 100644 --- a/backend/src/agent/brains/szenario.brain.ts +++ b/backend/src/agent/brains/szenario.brain.ts @@ -75,7 +75,8 @@ export class SzenarioBrain extends Brain { const totalDuration = differenceInSeconds(this.startDate, this.endDate); const progressDuration = differenceInSeconds(this.startDate, time); - this.finishedPercent = (progressDuration / totalDuration) * 100; + this.finishedPercent = + 100 * Math.min(1, progressDuration / totalDuration); if (!datapoint) return;