From c8dd5cd32705d7f905ac111bea0afb7020357b54 Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Mon, 29 Jun 2015 21:22:41 +0300 Subject: [PATCH 1/3] fix --- SE_API/ProjectRoutes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SE_API/ProjectRoutes.py b/SE_API/ProjectRoutes.py index a66ed58..b9d9047 100644 --- a/SE_API/ProjectRoutes.py +++ b/SE_API/ProjectRoutes.py @@ -75,7 +75,7 @@ def create_project(token): try: - project = Project(projectName=payload['projectName'], courseId=payload['courseId'], master_id=user.key().id(), gitRepository=payload['gitRepository'], membersId=[token]) + project = Project(projectName=payload['projectName'], courseId=payload['courseId'], master_id=user.key().id(), gitRepository=payload['gitRepository'], membersId=[user.key().id()]) except Exception as e: print e return bad_request() From 83d8420dcb0faee164887bffa352a66b481ef1e8 Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Mon, 29 Jun 2015 21:28:59 +0300 Subject: [PATCH 2/3] fix2 --- SE_API/ProjectRoutes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SE_API/ProjectRoutes.py b/SE_API/ProjectRoutes.py index b9d9047..f8dc075 100644 --- a/SE_API/ProjectRoutes.py +++ b/SE_API/ProjectRoutes.py @@ -75,7 +75,7 @@ def create_project(token): try: - project = Project(projectName=payload['projectName'], courseId=payload['courseId'], master_id=user.key().id(), gitRepository=payload['gitRepository'], membersId=[user.key().id()]) + project = Project(projectName=payload['projectName'], courseId=payload['courseId'], master_id=user.key().id(), gitRepository=payload['gitRepository'], membersId=[str(user.key().id())]) except Exception as e: print e return bad_request() From 1c1a2f7b543e3da4905ce061043e23009d3ff747 Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Mon, 29 Jun 2015 21:31:47 +0300 Subject: [PATCH 3/3] fix3 --- SE_API/ProjectRoutes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SE_API/ProjectRoutes.py b/SE_API/ProjectRoutes.py index f8dc075..2a54ecf 100644 --- a/SE_API/ProjectRoutes.py +++ b/SE_API/ProjectRoutes.py @@ -86,8 +86,8 @@ def create_project(token): print e pass - project.info = json.dumps(get_github_data(project.gitRepository)) db.put(project) + project.info = json.dumps(get_github_data(project.gitRepository, project.key().id())) #update user projects list user.projects_id_list.append(str(project.key().id())) @@ -395,7 +395,7 @@ def updateProjectsInfo(): try: projects = Project.all() for project in projects.run(): - project.info = json.dumps(get_github_data(project.gitRepository)) + project.info = json.dumps(get_github_data(project.gitRepository, project.key().id())) db.put(project) db.save return accepted()