Skip to main content

record

Function record 

Source
pub async fn record(db: &Db, entry: LogEntry<'_>) -> Result<()>
Expand description

Write one row to the action log. Validates required fields before touching the DB so a broken audit pipeline becomes visible.

object_id == 0 is reserved for bulk-dispatch rows (POST /admin/:model/bulk/:name): the affected ids live in metadata.ids, and the row’s metadata.kind is "bulk_action". The history page can render bulk rows distinctly from per-object rows by checking that pair. Negative object_id values remain invalid.