Skip to content

Commit

Permalink
dont stop importing reports if exception occurs
Browse files Browse the repository at this point in the history
send mail instead
  • Loading branch information
djbrown committed Oct 3, 2020
1 parent e196184 commit 372c298
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/players/management/commands/import_reports.py
Expand Up @@ -100,7 +100,10 @@ def import_league(self, league):
return

for game in league.game_set.all():
self.import_game(game)
try:
self.import_game(game)
except Exception:
logging.getLogger('mail').exception("Could not import Report")

def import_game(self, game: Game):
if self.options['games'] and game.number not in self.options['games']:
Expand Down

0 comments on commit 372c298

Please sign in to comment.