handle template archived

This commit is contained in:
Pete Matsyburka
2026-06-09 19:34:58 +03:00
parent 7784346a97
commit 28f47e1093
3 changed files with 12 additions and 0 deletions
@@ -54,6 +54,12 @@ module Api
return render json: { error: 'Template not found' }, status: :unprocessable_content if @template.nil?
if @template.archived_at?
Rollbar.warning("Archived template submission: #{@template.id}") if defined?(Rollbar)
return render json: { error: 'Template has been archived' }, status: :unprocessable_content
end
if @template.fields.blank?
Rollbar.warning("Template does not contain fields: #{@template.id}") if defined?(Rollbar)