From 276c979b73125a3ce201d7db871418e872c94554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=B5=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=20=D0=9E=D0=BB=D1=8C=D0=B3=D0=B0?= Date: Thu, 6 May 2021 12:51:40 +0300 Subject: [PATCH] Change make_engineer --- main/extra_func.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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