diff --git a/main/extra_func.py b/main/extra_func.py index 10ed367..cc8451b 100644 --- a/main/extra_func.py +++ b/main/extra_func.py @@ -39,17 +39,17 @@ def update_role(user_profile: UserProfile, role: int, who_changes: get_user_mode zendesk.admin.users.update(user) -def make_engineer(user_profile: UserProfile, who_changes: get_user_model()) -> None: +def make_engineer(user_profile: UserProfile) -> None: """ Функция устанавливает пользователю роль инженера. :param user_profile: Профиль пользователя :return: Вызов функции **update_role** с параметрами: профиль пользователя, роль "engineer" """ - update_role(user_profile, ROLES['engineer'], who_changes) + update_role(user_profile, ROLES['engineer']) -def make_light_agent(user_profile: UserProfile, who_changes: get_user_model()) -> None: +def make_light_agent(user_profile: UserProfile) -> None: """ Функция устанавливает пользователю роль легкого агента. @@ -76,7 +76,7 @@ def make_light_agent(user_profile: UserProfile, who_changes: get_user_model()) - attempts, success = 5, False while not success and attempts != 0: try: - update_role(user_profile, ROLES['light_agent'], who_changes) + update_role(user_profile, ROLES['light_agent']) success = True except APIException as e: attempts -= 1