|
|
@ -155,7 +155,6 @@ class Player(UserMixin, db.Model): |
|
|
|
return max((location for location in self.locations if location.timestamp > game_start and location.timestamp < game_end), |
|
|
|
return max((location for location in self.locations if location.timestamp > game_start and location.timestamp < game_end), |
|
|
|
key=lambda location: location.timestamp) |
|
|
|
key=lambda location: location.timestamp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
@staticmethod |
|
|
|
def delete_orphans(): |
|
|
|
def delete_orphans(): |
|
|
|
Player.query.filter(~Player.player_games.any()).delete() |
|
|
|
Player.query.filter(~Player.player_games.any()).delete() |
|
|
|