]> git.localhorst.tv Git - alttp.git/commitdiff
allow unlimited tournament scoring
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 2 Feb 2026 16:22:22 +0000 (17:22 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 2 Feb 2026 16:22:22 +0000 (17:22 +0100)
app/Models/Tournament.php

index e0104cbb7b885c2f7f76776ae5e28010424b9593..4860fb4b1b8e2760e6806b241ab04b9b06106a05 100644 (file)
@@ -41,7 +41,11 @@ class Tournament extends Model {
        }
 
        public function getScorableRounds(): Collection {
-               return $this->rounds()->limit($this->total_scoring_limit)->get();
+               $rounds = $this->rounds();
+               if ($this->total_scoring_limit) {
+                       $rounds->limit($this->total_scoring_limit);
+               }
+               return $rounds->get();
        }
 
        public function hasScoreboard(): bool {