From 8776302c2abc7793d1cf56c14b995eafd9a0c979 Mon Sep 17 00:00:00 2001 From: Burathar Date: Sun, 19 Jul 2020 17:33:14 +0200 Subject: [PATCH] filter None results from game.last_locations() --- 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 befdb15..d7ff218 100644 --- a/app/models/game.py +++ b/app/models/game.py @@ -37,7 +37,9 @@ class Game(db.Model): for player in players: if isinstance(player, GamePlayer): player = player.user - locations.append(player.last_location(self)) + location = player.last_location(self) + if location: + locations.append(location) return locations def bunnies(self):