chg: [log] Convert object's fs/ls into understood format

pull/6327/head
mokaddem 2020-09-18 16:41:26 +02:00
parent 18097f05db
commit e0bf738b11
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 0 deletions

View File

@ -1057,6 +1057,7 @@ class Log extends AppModel
}
switch($logEntry['action']) {
case 'add':
$logEntry['data'] = $this->Attribute->UTCToISODatetime(['Object' => $logEntry['data']], 'Object');
if (!empty($this->mockRecovery)) {
$this->mockLog[] = ['model' => 'MispObject', 'action' => 'add', 'data' => $logEntry['data']];
} else {
@ -1065,6 +1066,7 @@ class Log extends AppModel
}
break;
case 'edit':
$logEntry['data'] = $this->Attribute->UTCToISODatetime(['Object' => $logEntry['data']], 'Object');
$object = $this->MispObject->find('first', [
'recursive' => -1,
'conditions' => ['Object.id' => $logEntry['model_id']]