skip webhook not found

This commit is contained in:
Pete Matsyburka committed 2025-12-03 13:20:52 +02:00
1 parent e92fc0d3e1
commit cba2d02990
12 files changed
+79 -24

No files matched your search

@@ -8,8 +8,13 @@ class SendTemplateUpdatedWebhookRequestJob
MAX_ATTEMPTS = 10
def perform(params = {})
template = Template.find(params['template_id'])
webhook_url = WebhookUrl.find(params['webhook_url_id'])
template = Template.find_by(id: params['template_id'])
return unless template
webhook_url = WebhookUrl.find_by(id: params['webhook_url_id'])
return unless webhook_url
attempt = params['attempt'].to_i