fix: [auditlog] use insert() rather than save() as that is not available in the behavior
- fixes exception on logging deletes, blocking any actual deletionspull/79/head
parent
22e4a90af0
commit
3cc857c42f
|
@ -129,14 +129,13 @@ class AuditLogBehavior extends Behavior
|
|||
$modelTitle = $entity[$modelTitleField];
|
||||
}
|
||||
|
||||
$logEntity = $this->auditLogs()->newEntity([
|
||||
$this->auditLogs()->insert([
|
||||
'request_action' => $entity->getConstant('ACTION_DELETE'),
|
||||
'model' => $entity->getSource(),
|
||||
'model_id' => $this->old->id,
|
||||
'model_title' => $modelTitle,
|
||||
'change' => $this->changedFields($entity)
|
||||
]);
|
||||
$logEntity->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue