diff --git a/arkindex/dataimport/api.py b/arkindex/dataimport/api.py index 5b91c3cbdb0fc811365907f54d65d46ff5a84334..9701dabd02d073d71ce6e9566ba757390b4656f7 100644 --- a/arkindex/dataimport/api.py +++ b/arkindex/dataimport/api.py @@ -1038,7 +1038,7 @@ class WorkerConfigurationList(WorkerACLMixin, ListCreateAPIView): Q(configuration=configuration) | Q(name=name) ) ).exists(): - raise ValidationError({'worker': 'A worker configuration with this worker and this name or this configuration already exists'}) + raise ValidationError({'__all__': 'A worker configuration with this name or this configuration already exists for this worker'}) configuation = WorkerConfiguration.objects.create( worker=worker, diff --git a/arkindex/dataimport/tests/test_workers.py b/arkindex/dataimport/tests/test_workers.py index ffd6e19b94f38d41d9b1c9a3ec40071beeba38bb..b675feae817298e92854d52a7a2a239692d3a350 100644 --- a/arkindex/dataimport/tests/test_workers.py +++ b/arkindex/dataimport/tests/test_workers.py @@ -1060,7 +1060,7 @@ class TestWorkersWorkerVersions(FixtureAPITestCase): self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertDictEqual( response.json(), - {'worker': 'A worker configuration with this worker and this name or this configuration already exists'} + {'__all__': 'A worker configuration with this name or this configuration already exists for this worker'} ) def test_configurations_create_configuration_already_exists(self): @@ -1087,7 +1087,7 @@ class TestWorkersWorkerVersions(FixtureAPITestCase): self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertDictEqual( response.json(), - {'worker': 'A worker configuration with this worker and this name or this configuration already exists'} + {'__all__': 'A worker configuration with this name or this configuration already exists for this worker'} ) def test_configurations_create(self):