From fe397a2443168f0469ee9506e8c688ad45c7b828 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sat, 27 Jun 2015 17:18:59 +0300 Subject: [PATCH] Fixed API Syntax Error Causing 500 Fix #74 --- SE_API/CourseRoutes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SE_API/CourseRoutes.py b/SE_API/CourseRoutes.py index 7075f36..2864493 100644 --- a/SE_API/CourseRoutes.py +++ b/SE_API/CourseRoutes.py @@ -317,7 +317,7 @@ def getCampusesByUser(token,campusId): arr = [] - for i in user['courses_id_list']: + for i in user.courses_id_list: course = Course.get_by_id(int(i)) if course.courseName == campus.title: arr.append(dict(json.loads(course.to_JSON()))) @@ -327,7 +327,7 @@ def getCampusesByUser(token,campusId): status=200, mimetype="application/json") else: - return Response(response=[], + return Response(response='[]', status=200, mimetype="application/json")