handle template archived

This commit is contained in:
Pete Matsyburka committed 2026-06-09 19:49:12 +03:00
1 parent 7784346a97
commit 28f47e1093
3 files changed
+12

No files matched your search

@@ -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)