moo.sdk.audit.record_action
- moo.sdk.audit.record_action(action, target=None, detail='', actor=None, force=False)
Append one consequential action to the audit log.
- Parameters:
action – one of
AuditLog’s action constantstarget – the affected Object (or
None); recorded by pk and a name snapshot so the row survives the target’s deletiondetail – optional free-text / serialized context
actor – the acting Player account; defaults to the current account
force – record even when no human actor is resolvable (used by staff-initiated sanctions that must always be logged)
- Returns:
the created AuditLog row, or
Noneif skipped