mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-06-15 23:34:22 +02:00
Do not make a pairing object if object is not a pairing
This commit is contained in:
parent
2e68354a91
commit
7a3c754b7a
|
@ -90,5 +90,4 @@ class Round
|
||||||
{
|
{
|
||||||
$this->pairings = $pairings;
|
$this->pairings = $pairings;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -621,10 +621,12 @@ class Sws extends SwsModel
|
||||||
$pairing->setRound($x);
|
$pairing->setRound($x);
|
||||||
$offset += 2;
|
$offset += 2;
|
||||||
|
|
||||||
|
if (!($result == Result::none && $opponent == 0)) {
|
||||||
$sws->getTournament()->addPairing($pairing);
|
$sws->getTournament()->addPairing($pairing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sws->getTournament()->pairingsToRounds();
|
$sws->getTournament()->pairingsToRounds();
|
||||||
return $sws;
|
return $sws;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user