@receiver(post_save, sender=Score)<EOL><INDENT>def update_score_summary(sender, **kwargs):<DEDENT>
score = kwargs['<STR_LIT>']<EOL>try:<EOL><INDENT>score_summary = ScoreSummary.objects.get(<EOL>student_item=score.student_item<EOL>)<EOL>score_summary.latest = score<EOL>if score.reset:<EOL><INDENT>score_summary.highest = score<EOL><DEDENT>elif score.to_float() > score_summary.highest.to_float():<EOL><INDENT>score_summary.highest = score<EOL><DEDENT>score_summary.save()<EOL><DEDENT>except ScoreSummary.DoesNotExist:<EOL><INDENT>ScoreSummary.objects.create(<EOL>student_item=score.student_item,<EOL>highest=score,<EOL>latest=score,<EOL>)<EOL><DEDENT>except DatabaseError as err:<EOL><INDENT>logger.exception(<EOL>u"<STR_LIT>"<EOL>.format(score.student_item)<EOL>)<EOL><DEDENT>
Listen for new Scores and update the relevant ScoreSummary.

Args:
    sender: not used

Kwargs:
    instance (Score): The score model whose save triggered this receiver.