Browse Source

fix player is null error on game_owner_dashboard

testing
Burathar 4 years ago
parent
commit
7b6326dc46
  1. 4
      app/models/game.py

4
app/models/game.py

@ -32,7 +32,9 @@ class Game(db.Model): @@ -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):
'''

Loading…
Cancel
Save