mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-09 18:48:41 +00:00
only log updates if model is changed
This commit is contained in:
parent
5f6839cb03
commit
bd1874acb7
|
|
@ -106,6 +106,11 @@ final class ApiController extends Controller
|
|||
{
|
||||
$oldString = StringUtils::stringify($old, \JSON_PRETTY_PRINT);
|
||||
$newString = StringUtils::stringify($new, \JSON_PRETTY_PRINT);
|
||||
|
||||
if ($oldString === $newString) {
|
||||
return;
|
||||
}
|
||||
|
||||
$audit = new Audit(new NullAccount($account), $oldString, $newString, $type, $subtype, $module, $ref, $content, \ip2long($ip ?? '127.0.0.1'));
|
||||
|
||||
AuditMapper::create($audit);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user