diff --git a/arkindex/ponos/api.py b/arkindex/ponos/api.py index 9334dc0e822b2bdffcce4f75cc8d985e5615a00a..e4b60bc1c147f989918751d0382547882094eff0 100644 --- a/arkindex/ponos/api.py +++ b/arkindex/ponos/api.py @@ -224,6 +224,7 @@ class TaskRestart(ProcessACLMixin, CreateAPIView): detail="Task's state must be in a final state to be restarted." ) # TODO Check the original_task_id field directly once it is implemented + # https://gitlab.teklia.com/arkindex/frontend/-/issues/1383 _, *suffix = task.slug.rsplit("_old", 1) if suffix: diff --git a/arkindex/ponos/tests/test_api.py b/arkindex/ponos/tests/test_api.py index 986db55f0132ff7da0fc8147e5b757a669eba86f..fbf730f6ab8263f37dd01ddbb41699eac2b9be82 100644 --- a/arkindex/ponos/tests/test_api.py +++ b/arkindex/ponos/tests/test_api.py @@ -74,6 +74,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -157,6 +158,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -198,6 +200,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -657,6 +660,7 @@ class TestAPI(FixtureAPITestCase): "full_log": "http://somewhere", "gpu": None, "logs": "Task has been restarted", + "original_task_id": str(self.task2.id), "parents": [str(self.task1.id)], "run": 0, "shm_size": None, @@ -721,6 +725,7 @@ class TestAPI(FixtureAPITestCase): "full_log": "http://somewhere", "gpu": None, "logs": "Task has been restarted", + "original_task_id": str(self.task2.id), "parents": [str(self.task1.id)], "run": 0, "shm_size": None,