Closes #20029: Add object_type to webhook data (#20049)

This commit is contained in:
Jeremy Stretch
2025-08-08 22:05:26 -04:00
committed by GitHub
parent ab8e3ee956
commit 1242ad68f7

View File

@@ -51,6 +51,7 @@ def send_webhook(event_rule, object_type, event_type, data, timestamp, username,
context = { context = {
'event': WEBHOOK_EVENT_TYPES.get(event_type, event_type), 'event': WEBHOOK_EVENT_TYPES.get(event_type, event_type),
'timestamp': timestamp, 'timestamp': timestamp,
'object_type': '.'.join(object_type.natural_key()),
'model': object_type.model, 'model': object_type.model,
'username': username, 'username': username,
'request_id': request.id if request else None, 'request_id': request.id if request else None,