Skip to content

Commit 5750058

Browse files
Thans Stan
1 parent b7660be commit 5750058

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Domain/Strava/Athlete/Weight/ImportAthleteWeight/ImportAthleteWeightCommandHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ public function handle(Command $command): void
2323

2424
$this->athleteWeightRepository->removeAll();
2525

26-
if (!$athleteWeights = $this->athleteWeightsFromEnvFile->getAll()) {
26+
$athleteWeights = $this->athleteWeightsFromEnvFile->getAll();
27+
if ($athleteWeights->isEmpty()) {
2728
$command->getOutput()->writeln('No athlete weights found. Will not be able to calculate relative power outputs');
29+
30+
return;
2831
}
2932

3033
/** @var \App\Domain\Strava\Athlete\Weight\AthleteWeight $weight */

0 commit comments

Comments
 (0)