Added roundname for missing tipps and jokers

This commit is contained in:
Torsten 2017-11-16 09:05:26 +01:00
parent 25cd90a1fb
commit ff0e6dfb46
3 changed files with 9 additions and 12 deletions

View file

@ -123,15 +123,7 @@ class Round extends Model
}
public static function getFirstTippableRoundId($seasonId=-1) {
$season=null;
if ($seasonId==-1) {
$season=Season::getCurrent();
} else {
$season=Season::where('id','=', $seasonId)->first();
}
if (!$season) return null;
$round = Round::getFirstTippableRound($season->id);
$round = Round::getFirstTippableRound();
if (!$round) return -1;
return $round->id;
}