Do not make a pairing object if object is not a pairing

This commit is contained in:
Jeroen De Meerleer 2019-05-01 19:55:37 +02:00
parent 2e68354a91
commit 7a3c754b7a
2 changed files with 3 additions and 2 deletions

View File

@ -90,5 +90,4 @@ class Round
{
$this->pairings = $pairings;
}
}

View File

@ -621,7 +621,9 @@ class Sws extends SwsModel
$pairing->setRound($x);
$offset += 2;
$sws->getTournament()->addPairing($pairing);
if (!($result == Result::none && $opponent == 0)) {
$sws->getTournament()->addPairing($pairing);
}
}
}
}