X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/b6836ce0cc2dce392a9f604b781d6430740ce1de..73fdcfae51e18d4ee8b84214fb44dad3d58ba49a:/stage2/models.py diff --git a/stage2/models.py b/stage2/models.py index 972376a..924b153 100644 --- a/stage2/models.py +++ b/stage2/models.py @@ -121,7 +121,7 @@ class Answer(models.Model): marks = self.mark_set.all() if len(marks) < 2: return None - return self.mark_set.aggregate(models.Avg('points')) + return self.mark_set.aggregate(avg=models.Avg('points'))['avg'] def attachment_path(instance, filename):