Skip to content

Commit

Permalink
Properly handle the first successful submission
Browse files Browse the repository at this point in the history
  • Loading branch information
n8kim1 committed Dec 29, 2020
1 parent c3fbbd6 commit d0b6b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def compilation_update(self, request, team, league_id, pk=None):
# Only if this submission is newer than what's already been processed,
# update the submission history.
# (to prevent reverting to older submissions that took longer to process)
if submission.id > team_sub.last_1_id:
if team_sub.last_1_id is None or submission.id > team_sub.last_1_id:
team_sub.last_3_id = team_sub.last_2_id
team_sub.last_2_id = team_sub.last_1_id
team_sub.last_1_id = submission
Expand Down

0 comments on commit d0b6b50

Please sign in to comment.