fix type_delete webhooks after refactor

This commit is contained in:
John Anderson 2018-07-21 18:08:10 -04:00
parent 2216758e43
commit fad7fd731c

View File

@ -62,9 +62,8 @@ class ChangeLoggingAndWebhookMiddleware(object):
# Perform change logging and fire Webhook signals
for obj, action in _thread_locals.changed_objects:
if obj.pk:
# Log object changes
if hasattr(obj, 'log_change'):
if obj.pk and hasattr(obj, 'log_change'):
obj.log_change(request.user, request.id, action)
# Enqueue Webhooks if they are enabled