From 7b6326dc460ae79e48842d5621fa802b1517f27f Mon Sep 17 00:00:00 2001 From: Burathar Date: Mon, 27 Jul 2020 18:38:31 +0200 Subject: [PATCH] fix player is null error on game_owner_dashboard --- app/models/game.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/game.py b/app/models/game.py index d8a95c6..2367b1b 100644 --- a/app/models/game.py +++ b/app/models/game.py @@ -32,7 +32,9 @@ class Game(db.Model): def last_player_locations(self, offset=None): # pylint: disable=not-an-iterable - return [player.last_location(offset=offset) for player in self.players if player.user.locations] + return [location for location in + [player.last_location(offset=offset) for player in self.players if player.user.locations] + if location is not None] def last_locations(self, players, offset=None): '''