Make points per draw optional
dyb-tech.com/LaLiga-BackEnd/pipeline/head This commit looks good
Details
dyb-tech.com/LaLiga-BackEnd/pipeline/head This commit looks good
Details
This commit is contained in:
parent
25d3d7c12c
commit
af3a0167e4
|
|
@ -71,7 +71,7 @@ class SeasonDto
|
||||||
{
|
{
|
||||||
$this->pointsPerWin = (int) $dataList['pointsPerWin'];
|
$this->pointsPerWin = (int) $dataList['pointsPerWin'];
|
||||||
}
|
}
|
||||||
if (isset($dataList['pointsPerDraw']))
|
if (empty($dataList['pointsPerDraw']))
|
||||||
{
|
{
|
||||||
$this->pointsPerDraw = (int) $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.';
|
$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.';
|
$this->validationErrors[] = 'Los puntos por empate deben ser superiores a los puntos por partido perdido.';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue