In my app there's a Project
model which users can create, request to join, invite others to join, accept/reject requests/invites to join, leave, etc.
I'm using the Django LogEntry
to help the application admins keep track of all changes to each Project
, but also changes to related objects such as ProjectMember
, ProjectMemberRequest
and ProjectMemberInvite
.
Both ProjectMemberRequest
and ProjectMemberInvite
have expiration dates which means that, if they aren't accepted/rejected within 3 days after being created, the system automatically sets them as 'expired'.
How can I log this automatic expiration of ProjectMemberRequest
and ProjectMemberInvite
, knowing that LogEntry
requires a user and this expiration actions are not triggered by a user?
A workaround I could use is to create a "System" superuser and log these automatic actions to that user.
Is there anything better?