Skip to content

Commit

Permalink
More info in EventRegistration
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed May 18, 2024
1 parent 8da5581 commit f2c650f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ def get_history_events(self, obj):
class EventRegistrationSerializer(serializers.ModelSerializer):
class Meta:
model = models.EventRegistration
fields = ['school', 'grade', 'profile']
fields = ['school', 'grade', 'profile', 'id', 'event']
school = SchoolShortSerializer(many=False)
grade = serializers.SlugRelatedField(
slug_field='tag', many=False, read_only=True)
profile = ProfileShortSerializer(many=False)
verbose_name = serializers.SerializerMethodField('get_verbose_name')

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


@ts_interface(context='competition')
Expand Down

0 comments on commit f2c650f

Please sign in to comment.