Fix: Employee Onboarding/Seperation task Assignment

This commit is contained in:
Anurag Mishra 2019-01-04 11:36:30 +05:30
parent 1fa3f7d81e
commit add6bf35a3

View File

@ -54,10 +54,17 @@ class EmployeeBoardingController(Document):
where parenttype='User' and role=%s''', activity.role) where parenttype='User' and role=%s''', activity.role)
users = users + user_list users = users + user_list
if "Administrator" in users:
users.remove("Administrator")
# assign the task the users # assign the task the users
if users: if users:
print(users)
self.assign_task_to_users(task, set(users)) self.assign_task_to_users(task, set(users))
users = []
def assign_task_to_users(self, task, users): def assign_task_to_users(self, task, users):
for user in users: for user in users:
args = { args = {