1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

implements #2933 - username in webhooks

This commit is contained in:
John Anderson
2019-03-24 15:31:12 -04:00
parent 3acc8ca3ab
commit 2170eedf08
4 changed files with 8 additions and 5 deletions

View File

@ -9,7 +9,7 @@ from utilities.api import get_serializer_for_model
from .constants import WEBHOOK_MODELS
def enqueue_webhooks(instance, action):
def enqueue_webhooks(instance, user, action):
"""
Find Webhook(s) assigned to this instance + action and enqueue them
to be processed
@ -47,5 +47,6 @@ def enqueue_webhooks(instance, action):
serializer.data,
instance._meta.model_name,
action,
str(datetime.datetime.now())
str(datetime.datetime.now()),
user.username
)