mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Merge pull request #7204 from marshmalien/fix/handleJobQueryResponseError
Handle SyntaxError during job search query
This commit is contained in:
commit
80488e8333
@ -254,7 +254,8 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
|
||||
},
|
||||
error(data, status) {
|
||||
if(data && data.detail){
|
||||
let error = JSON.parse(data.detail);
|
||||
let error = typeof data.detail === "string" ? data.detail : JSON.parse(data.detail);
|
||||
|
||||
if(_.isArray(error)){
|
||||
data.detail = error[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user