Skip to content

Commit

Permalink
Added stats to problem administation
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamín Mravec committed Nov 11, 2023
1 parent 5dd3f1b commit 0f1b530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class ProblemWithSolutionsSerializer(serializers.ModelSerializer):
solution_set = SolutionAdministrationSerializer(many=True)
correction = ProblemCorrectionSerializer(many=False)
series = SeriesSerializer()

histogram = serializers.SerializerMethodField('get_series_histogram')
total_solutions = serializers.SerializerMethodField('get_series_num_solutions')

Expand All @@ -207,7 +207,7 @@ class Meta:

def get_series_histogram(self, obj):
return models.Problem.get_stats(obj).get('histogram')

def get_series_num_solutions(self, obj):
return models.Problem.get_stats(obj).get('num_solutions')

Expand Down

0 comments on commit 0f1b530

Please sign in to comment.