fix: [Training] Further error handling

pull/4411/head
iglocska 2019-04-02 11:43:14 +02:00
parent f441ce87d7
commit ed12caef5d
1 changed files with 6 additions and 0 deletions

View File

@ -494,6 +494,12 @@ class TrainingShell extends AppShell {
if ($response->code != 200) {
$this->__responseError($response, $options);
}
$options = array(
'url' => $this->__currentUrl . '/organisations/view/' . $org_data['Organisation']['uuid'],
'method' => 'GET'
);
$response = $this->__queryRemoteMISP($options, true);
$response_data = json_decode($response->body, true);
return $response_data['Organisation']['id'];
}
}