fix: [enrichment] Displaying error value in the job status instead of the json format

pull/4584/head
chrisr3d 2019-04-12 23:40:29 +02:00
parent 89af7cda24
commit 8a9612b376
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 3 deletions

View File

@ -5967,7 +5967,7 @@ class Event extends AppModel
}
if ($failed_attributes > 0) {
if ($failed_attributes == 1) {
$reason = ' attribute could not be saved. Reason for the failure: ' . json_encode($lastAttributeError) . ' ';
$reason = ' attribute could not be saved. Reason for the failure: ' . $lastAttributeError['value'] . ' ';
} else {
$reason = ' attributes could not be saved. This may be due to attributes with similar values already existing. ';
}
@ -5987,7 +5987,7 @@ class Event extends AppModel
} else {
$reason = ' objects could not be saved. An example of reason for the failure: ';
}
$message .= $failed_objects . $reason . json_encode($lastObjectError) . ' ';
$message .= $failed_objects . $reason . $lastObjectError['value'] . ' ';
}
if ($failed_object_attributes > 0) {
if ($failed_object_attributes == 1) {
@ -5995,7 +5995,7 @@ class Event extends AppModel
} else {
$reason = 'object attributes could not be saved. An example of reason for the failure: ';
}
$message .= 'By the way, ' . $failed_object_attributes . $reason . json_encode($lastObjectAttributeError) . '.';
$message .= 'By the way, ' . $failed_object_attributes . $reason . $lastObjectAttributeError['value'] . '.';
}
if (!empty($reference_errors)) {
$reference_error = sizeof($reference_errors) == 1 ? 'a reference is' : 'some references are';