Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
3412252f
Commit
3412252f
authored
Mar 17, 2020
by
BAIRE Anthony
Browse files
Report job error states in the API
(to keep consistent with the rails implementation) fix
#349
fix
#356
parent
a7d0b5eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
django/allgo/api/v1/views.py
View file @
3412252f
...
...
@@ -34,7 +34,7 @@ class APIJobView(JobAuthMixin, View):
response
=
{
job
.
id
:
files
,
"status"
:
job
.
get_state_display
()
.
lower
(),
"status"
:
"done"
if
job
.
result
==
Job
.
SUCCESS
else
job
.
status
.
lower
(),
}
return
JsonResponse
(
response
)
except
Job
.
DoesNotExist
as
e
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment