mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
closes #4368 - extras features model registration
This commit is contained in:
@@ -8,6 +8,7 @@ from extras.models import Webhook
|
||||
from utilities.api import get_serializer_for_model
|
||||
from .choices import *
|
||||
from .constants import *
|
||||
from .utils import FeatureQuerySet
|
||||
|
||||
|
||||
def generate_signature(request_body, secret):
|
||||
@@ -29,7 +30,7 @@ def enqueue_webhooks(instance, user, request_id, action):
|
||||
"""
|
||||
obj_type = ContentType.objects.get_for_model(instance.__class__)
|
||||
|
||||
webhook_models = ContentType.objects.filter(WEBHOOK_MODELS)
|
||||
webhook_models = ContentType.objects.filter(FeatureQuerySet('webhooks').get_queryset())
|
||||
if obj_type not in webhook_models:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user