diff --git a/erpnext/hr/utils.py b/erpnext/hr/utils.py index f35eb5919e..5058006431 100644 --- a/erpnext/hr/utils.py +++ b/erpnext/hr/utils.py @@ -54,10 +54,17 @@ class EmployeeBoardingController(Document): where parenttype='User' and role=%s''', activity.role) users = users + user_list + if "Administrator" in users: + users.remove("Administrator") + + # assign the task the users if users: + print(users) self.assign_task_to_users(task, set(users)) + users = [] + def assign_task_to_users(self, task, users): for user in users: args = {