mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
14132 fix
This commit is contained in:
parent
e74fb89a30
commit
aa8ed1194a
@ -12,7 +12,7 @@ from utilities.api import get_serializer_for_model
|
|||||||
from utilities.rqworker import get_rq_retry
|
from utilities.rqworker import get_rq_retry
|
||||||
from utilities.utils import serialize_object
|
from utilities.utils import serialize_object
|
||||||
from .choices import *
|
from .choices import *
|
||||||
from .models import Webhook
|
from .models import EventRule, Webhook
|
||||||
|
|
||||||
|
|
||||||
def serialize_for_event(instance):
|
def serialize_for_event(instance):
|
||||||
@ -86,9 +86,9 @@ def flush_events(queue):
|
|||||||
}[data['event']]
|
}[data['event']]
|
||||||
content_type = data['content_type']
|
content_type = data['content_type']
|
||||||
|
|
||||||
# Cache applicable Webhooks
|
# Cache applicable Event Rules
|
||||||
if content_type not in events_cache[action_flag]:
|
if content_type not in events_cache[action_flag]:
|
||||||
events_cache[action_flag][content_type] = Webhook.objects.filter(
|
events_cache[action_flag][content_type] = EventRule.objects.filter(
|
||||||
**{action_flag: True},
|
**{action_flag: True},
|
||||||
content_types=content_type,
|
content_types=content_type,
|
||||||
enabled=True
|
enabled=True
|
||||||
|
Loading…
Reference in New Issue
Block a user