From c47a7c36be2a68ec118847ccfdb7d358abd5a6fc Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Mon, 13 Mar 2017 16:31:08 +0100
Subject: [PATCH] api for types include id

---
 smash/web/api_views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/smash/web/api_views.py b/smash/web/api_views.py
index dbd41975..e2d22fbe 100644
--- a/smash/web/api_views.py
+++ b/smash/web/api_views.py
@@ -50,9 +50,11 @@ def appointment_types(request):
     result = []
     for appointment in appointments:
         result.append({
+            "id": appointment.id,
             "type": appointment.code,
             "default_duration": appointment.default_duration,
-            "can_be_parallelized: ": appointment.can_be_parallelized})
+            "can_be_parallelized: ": appointment.can_be_parallelized,
+        })
     return JsonResponse({
         "appointments" : result
     })
-- 
GitLab