Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
6a34c819
Commit
6a34c819
authored
3 years ago
by
Manon Blanco
Browse files
Options
Downloads
Patches
Plain Diff
Update error message
parent
877fd883
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arkindex/dataimport/api.py
+1
-1
1 addition, 1 deletion
arkindex/dataimport/api.py
arkindex/dataimport/tests/test_workers.py
+2
-2
2 additions, 2 deletions
arkindex/dataimport/tests/test_workers.py
with
3 additions
and
3 deletions
arkindex/dataimport/api.py
+
1
−
1
View file @
6a34c819
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
arkindex/dataimport/tests/test_workers.py
+
2
−
2
View file @
6a34c819
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment