Skip to content

Commit

Permalink
Add can_resubmit to SeriesSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed Nov 12, 2023
1 parent 05b0b5e commit 651d09a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def get_series_num_solutions(self, obj):
class SeriesWithProblemsSerializer(ModelWithParticipationSerializer):
problems = ProblemSerializer(many=True)
can_submit = serializers.SerializerMethodField('get_can_submit')
can_resubmit = serializers.SerializerMethodField('get_can_resubmit')

class Meta:
model = models.Series
Expand All @@ -271,6 +272,9 @@ class Meta:
def get_can_submit(self, obj):
return obj.can_submit

def get_can_resubmit(self, obj):
return obj.can_resubmit

def get_event(self, obj):
return obj.semester

Expand Down

0 comments on commit 651d09a

Please sign in to comment.