Skip to content

Commit

Permalink
Add verbose name for semester (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe authored Apr 13, 2024
1 parent f8a6833 commit 11b603f
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 @@ -361,6 +361,7 @@ class SemesterWithProblemsSerializer(ModelWithParticipationSerializer):
)
publication_set = PublicationSerializer(many=True, read_only=True)
complete = serializers.SerializerMethodField('get_complete')
verbose_name = serializers.SerializerMethodField('get_verbose_name')

class Meta:
model = models.Semester
Expand All @@ -384,6 +385,9 @@ def create(self, validated_data: dict):
semester.late_tags.add(tag)
return semester

def get_verbose_name(self, obj):
return str(obj)


@ts_interface(context='competition')
class LateTagSerializer(serializers.ModelSerializer):
Expand Down

0 comments on commit 11b603f

Please sign in to comment.