'Send notifications to subscribers of an Object on Object delete'

def send_notifications_on_delete(self, user, request, sender, instance, **kwargs):

    auto_notify = getattr(instance, 'auto_notify', True)
    if (auto_notify and isinstance(instance, Object) and instance.get_related_object()):
        try:
            instance.create_notification('delete', user)
        except:
            pass
        instance.subscribers.clear()
