mirror of https://github.com/MISP/MISP
chg: [auditLog] Fetch field required for model info
parent
328b326297
commit
9458290b92
|
@ -94,6 +94,11 @@ class AuditLogBehavior extends ModelBehavior
|
|||
$fieldToFetch[] = 'event_id';
|
||||
}
|
||||
|
||||
// Fetch fields that are necessary to fill object title
|
||||
if (isset($this->modelInfo[$model->name]) && is_string($this->modelInfo[$model->name]) && !in_array($this->modelInfo[$model->name], $fieldToFetch, true)) {
|
||||
$fieldToFetch[] = $this->modelInfo[$model->name];
|
||||
}
|
||||
|
||||
if (empty($fieldToFetch)) {
|
||||
$this->old = null;
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue