Skip to content
Snippets Groups Projects
Commit 6a34c819 authored by Manon Blanco's avatar Manon Blanco
Browse files

Update error message

parent 877fd883
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment