Skip to content

Commit

Permalink
Restore silent failure of a29981d
Browse files Browse the repository at this point in the history
This restores the line added in a29981d
to make set_score() fail silently if the adjudicator is not on the
panel. It was removed by the merger of #1180, specifically in
a0eb1f7, which had been done long
before a29981d but not been merged until it was merged with #1180
(i.e., it was a merge conflict whose resolution appears to have
been overlooked).

Fixes #922.
  • Loading branch information
czlee committed Mar 7, 2021
1 parent 69e96dd commit 61f5c01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tabbycat/results/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,12 @@ def save(self):
defaults=self.get_defaults_fields('speakerscorebyadj', adj, side, pos))

def set_score(self, adjudicator, side, position, score):
self.scoresheets[adjudicator].set_score(side, position, score)
try:
self.scoresheets[adjudicator].set_score(side, position, score)
except KeyError:
logger.exception("Tried to set score by adjudicator %s, but this adjudicator "
"doesn't have a scoresheet.", adjudicator)
return

# --------------------------------------------------------------------------
# Model fields
Expand Down

0 comments on commit 61f5c01

Please sign in to comment.