mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Remain consistent with original action strings (e.g. 'created' instead of 'create')
This commit is contained in:
parent
a2b0da2608
commit
33890e6b97
@ -6,6 +6,7 @@ import requests
|
||||
from django_rq import job
|
||||
from rest_framework.utils.encoders import JSONEncoder
|
||||
|
||||
from .choices import ObjectChangeActionChoices
|
||||
from .constants import *
|
||||
|
||||
|
||||
@ -15,7 +16,7 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
|
||||
Make a POST request to the defined Webhook
|
||||
"""
|
||||
payload = {
|
||||
'event': event,
|
||||
'event': dict(ObjectChangeActionChoices)[event].lower(),
|
||||
'timestamp': timestamp,
|
||||
'model': model_name,
|
||||
'username': username,
|
||||
|
Loading…
Reference in New Issue
Block a user