mirror of
				https://git.webmeisterei.com/webmeisterei/todoist-taskwarrior.git
				synced 2025-10-31 02:02:41 +01:00 
			
		
		
		
	Skip task before trying to parse recur if it already exists
This commit is contained in:
		| @@ -115,6 +115,12 @@ def migrate(ctx, interactive, sync, map_project, map_tag): | ||||
|         tid = data['tid'] = task['id'] | ||||
|         name = data['name'] = task['content'] | ||||
|  | ||||
|         # Log message and check if exists | ||||
|         io.important(f'Task {idx + 1} of {len(tasks)}: {name}') | ||||
|         if check_task_exists(tid): | ||||
|             io.info(f'Already exists (todoist_id={tid})') | ||||
|             continue | ||||
|  | ||||
|         # Project | ||||
|         p = todoist.projects.get_by_id(task['project_id']) | ||||
|         project_hierarchy = [p] | ||||
| @@ -143,11 +149,7 @@ def migrate(ctx, interactive, sync, map_project, map_tag): | ||||
|         data['due'] = utils.parse_date(task['due_date_utc']) | ||||
|         data['recur'] = parse_recur_or_prompt(task['date_string']) | ||||
|  | ||||
|         io.important(f'Task {idx + 1} of {len(tasks)}: {name}') | ||||
|  | ||||
|         if check_task_exists(tid): | ||||
|             io.info(f'Already exists (todoist_id={tid})') | ||||
|         elif not interactive: | ||||
|         if not interactive: | ||||
|             add_task(**data) | ||||
|         else: | ||||
|             add_task_interactive(**data) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Matt Snider
					Matt Snider