Skip to content

Commit

Permalink
Merge pull request #1376 from codalab/comp-serializer
Browse files Browse the repository at this point in the history
CompetitionSerializer Simple vs Detail
  • Loading branch information
Didayolo authored Apr 3, 2024
2 parents 5a5bf58 + 92d0953 commit f601b55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/apps/api/views/competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def get_permissions(self):
def get_serializer_class(self):
if self.action == 'list':
return CompetitionSerializerSimple
if self.action == 'public':
return CompetitionSerializerSimple
elif self.action in ['get_phases', 'results', 'get_leaderboard_frontend_object']:
return LeaderboardPhaseSerializer
elif self.request.method == 'GET':
Expand Down

0 comments on commit f601b55

Please sign in to comment.