From 3d255b4bfd625f557d32230bfe4b3f5a1dd5ebb2 Mon Sep 17 00:00:00 2001 From: Angelina Tingaeva Date: Tue, 28 Nov 2023 16:01:00 +0500 Subject: [PATCH] refactor(mapping): mask assignee in def transform_data(data), change in 90 str "...else "dr.cyrill" --- mapping.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mapping.py b/mapping.py index bddc2c6..1dc452c 100644 --- a/mapping.py +++ b/mapping.py @@ -65,7 +65,7 @@ def transform_data(data): 'description': task['notes'], 'createdAt': task['created_at'], 'deadline': task['due_on'], - 'assignee': task['assignee'], + # 'assignee': task['assignee'], # 'milestone': task['section'], # 'memberships': task['memberships'], # 'parent': task[''], @@ -87,7 +87,7 @@ def create_tasks_in_tracker(data): 'Content-Type': 'appication/json', } for task in data: - ya_assignee = assignee[task['assignee']['gid']] if task.get('assignee', 0) !=0 else 'dr.cyrill@heado.ru' + ya_assignee = assignee[task['assignee']['gid']] if task.get('assignee', 0) !=0 else 'dr.cyrill' payload = { 'queue': 'TESTIMPORT', # Вынести в переменную 'summary': task['summary'], @@ -113,7 +113,6 @@ def create_tasks_in_tracker(data): 'Ошибка при создании задачи в ЯндексТрекер:', response.content, ) - exit() # asana_data = get_data_from_asana()