From f8a8f86ce9839824f5802a540ced7ced78b59736 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Wed, 1 May 2019 19:55:37 +0200 Subject: [PATCH] Do not make a pairing object if object is not a pairing --- src/Models/Round.php | 1 - src/Sws.php | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Models/Round.php b/src/Models/Round.php index b0994c5..5069c21 100644 --- a/src/Models/Round.php +++ b/src/Models/Round.php @@ -90,5 +90,4 @@ class Round { $this->pairings = $pairings; } - } diff --git a/src/Sws.php b/src/Sws.php index 0bba2b0..4aa9f98 100644 --- a/src/Sws.php +++ b/src/Sws.php @@ -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); + } } } }