Closes #20029: Add object_type to webhook data (#20049)
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled

This commit is contained in:
Jeremy Stretch 2025-08-08 22:05:26 -04:00 committed by GitHub
parent ab8e3ee956
commit 1242ad68f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,