Skip to content

Commit

Permalink
fix: Fix incorrect unaceppted submission listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ddenizakpinar committed Jun 30, 2023
1 parent 9d08bca commit d74c9ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/modules/challenge/challenge.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Interval } from '@nestjs/schedule';
import { DateTime } from 'luxon';

import { LobbyService } from '../lobby/lobby.service';
import { SubmissionStatus } from '../submission/models/enums';
import { TeamService } from '../team/team.service';
import { CreateChallengeDto } from './dtos/create-challenge.dto';
import {
Expand Down Expand Up @@ -60,7 +61,7 @@ export class ChallengeService {
populate: '*',
});
const submission = await this.dataService.submissions.findOne(
{ challengeId, teamId: teamFinishRanking.teamId },
{ challengeId, teamId: teamFinishRanking.teamId, status: SubmissionStatus.Accepted },
{ sort: { date: 'asc' } },
);

Expand Down

0 comments on commit d74c9ec

Please sign in to comment.