From b183db5b80655a028847db8b51c20282a7164f6e Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 25 Jun 2026 10:35:48 +0300 Subject: [PATCH] fix rubocop --- app/controllers/api/templates_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/templates_controller.rb b/app/controllers/api/templates_controller.rb index f6d3a7fe..2de64605 100644 --- a/app/controllers/api/templates_controller.rb +++ b/app/controllers/api/templates_controller.rb @@ -57,7 +57,10 @@ module Api SearchEntries.enqueue_reindex(@template) WebhookUrls.enqueue_events(@template, 'template.updated') - WebhookUrls.enqueue_events(@template, 'template.archived') if @template.saved_change_to_archived_at? && @template.archived_at? + + if @template.saved_change_to_archived_at? && @template.archived_at? + WebhookUrls.enqueue_events(@template, 'template.archived') + end render json: @template.as_json(only: %i[id updated_at]) end