From b6c67c6f40e2f519ec26d3a57e954c2962a4f198 Mon Sep 17 00:00:00 2001
From: Roosted7 <thomasroos@live.nl>
Date: Thu, 22 Mar 2018 14:19:22 +0100
Subject: [PATCH] Add number of submissions linked to exam to API

---
 zesje/resources/exams.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zesje/resources/exams.py b/zesje/resources/exams.py
index 1f1abbe99..8f35c9764 100644
--- a/zesje/resources/exams.py
+++ b/zesje/resources/exams.py
@@ -95,6 +95,7 @@ class Exams(Resource):
             {
                 'id': ex.id,
                 'name' : ex.name,
+                'submissions': ex.submissions.count()
             }
             for ex in Exam.select().order_by(Exam.id)
         ]
-- 
GitLab