X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/b6836ce0cc2dce392a9f604b781d6430740ce1de..3ca90d4aed87ed8b39c4984a290de6a3b898a7bd:/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):