From 1615963c15c9d3ee0478ef3394b7418f8f5e10bb Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Sun, 2 Aug 2015 17:55:45 +0300 Subject: [PATCH] fix mail to master of course --- SE_API/TaskRoutes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SE_API/TaskRoutes.py b/SE_API/TaskRoutes.py index e7c6c54..891abea 100644 --- a/SE_API/TaskRoutes.py +++ b/SE_API/TaskRoutes.py @@ -878,11 +878,12 @@ def sendTaskReminder(): course = Course.get_by_id(int(t.courseId)) if t.isPersonal: for uId in course.membersId: - tc = TaskComponent.all().filter("taskId = ", t.key().id()).filter("userId = ", int(uId)) - if tc.count() == 0: - user = User.get_by_id(int(uId)) - send_task_reminder(user.email, user.name, t.title, course.courseName) - print "" + if int(uId) != course.master_id: + tc = TaskComponent.all().filter("taskId = ", t.key().id()).filter("userId = ", int(uId)) + if tc.count() == 0: + user = User.get_by_id(int(uId)) + send_task_reminder(user.email, user.name, t.title, course.courseName) + print "" else: projects = Project.all().filter("courseId = ", course.key().id())