diff --git a/app/blueprints/api/tasks/routes.py b/app/blueprints/api/tasks/routes.py index 4f18d63..8ac94d0 100644 --- a/app/blueprints/api/tasks/routes.py +++ b/app/blueprints/api/tasks/routes.py @@ -100,7 +100,10 @@ def start_task(task_id: int): add_to_group_task.delay(task_id=task_id) case 'parse': - parse_users_task.delay(task_id=task_id) + if task.file: + parse_users_task.delay(task_id=task_id) + else: + parse_users_task.run(task_id=task_id) return '', 204