Merge branch 'feature/pylint' into feature/documentation

This commit is contained in:
Степаненко Ольга 2021-05-06 12:51:55 +03:00
commit 0be4c1b1ca

View File

@ -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