Clean up, update Webhook models

This commit is contained in:
Jeremy Stretch
2019-04-17 14:19:57 -04:00
parent 000fde25c6
commit 2f3c39295c
4 changed files with 45 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ def enqueue_webhooks(instance, user, request_id, action):
Find Webhook(s) assigned to this instance + action and enqueue them
to be processed
"""
if not settings.WEBHOOKS_ENABLED or instance._meta.model_name not in WEBHOOK_MODELS:
if not settings.WEBHOOKS_ENABLED or instance._meta.label.lower() not in WEBHOOK_MODELS:
return
# Retrieve any applicable Webhooks