diff --git a/src/Dto/SeasonDto.php b/src/Dto/SeasonDto.php index 0b9ece23..8b51c2bf 100644 --- a/src/Dto/SeasonDto.php +++ b/src/Dto/SeasonDto.php @@ -71,7 +71,7 @@ class SeasonDto { $this->pointsPerWin = (int) $dataList['pointsPerWin']; } - if (isset($dataList['pointsPerDraw'])) + if (empty($dataList['pointsPerDraw'])) { $this->pointsPerDraw = (int) $dataList['pointsPerDraw']; } @@ -206,7 +206,7 @@ class SeasonDto { $this->validationErrors[] = 'Los puntos por empate deben ser inferiores a los puntos por partido ganado.'; } - if (isset($this->pointsPerDraw, $this->pointsPerLoss) && ($this->pointsPerDraw < $this->pointsPerLoss)) + if (isset($this->pointsPerDraw, $this->pointsPerLoss) && ($this->pointsPerDraw > 0) && ($this->pointsPerDraw < $this->pointsPerLoss)) { $this->validationErrors[] = 'Los puntos por empate deben ser superiores a los puntos por partido perdido.'; }