fix: [log] Convert attribute's fs/ls into understood format

pull/6327/head
mokaddem 2020-09-18 15:32:50 +02:00
parent c7e6b2765e
commit 1074458cf7
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 0 deletions

View File

@ -837,6 +837,7 @@ class Log extends AppModel
}
switch($logEntry['action']) {
case 'add':
$logEntry['data'] = $this->Attribute->UTCToISODatetime(['Attribute' => $logEntry['data']], 'Attribute');
if (!empty($this->mockRecovery)) {
$this->mockLog[] = ['model' => 'Attribute', 'action' => 'add', 'data' => $logEntry['data']];
} else {
@ -850,6 +851,7 @@ class Log extends AppModel
'conditions' => ['Attribute.id' => $logEntry['model_id']]
]);
if (!empty($attribute)) {
$logEntry['data'] = $this->Attribute->UTCToISODatetime(['Attribute' => $logEntry['data']], 'Attribute');
foreach ($logEntry['data'] as $field => $value) {
$attribute['Attribute'][$field] = $value;
}