From 956813c66c7680c2df98f1dafa5d142d7c59c8d8 Mon Sep 17 00:00:00 2001 From: Andrej Date: Tue, 19 Nov 2024 12:52:12 +0100 Subject: [PATCH] Add defulat docx template if nothing is selected [SCI-11300] --- app/controllers/reports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 3b97e8b00..fab290fd7 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -144,7 +144,7 @@ class ReportsController < ApplicationController def edit @edit = true @active_template = @report.settings[:template] - @active_docx_template = @report.settings[:docx_template] + @active_docx_template = @report.settings[:docx_template].presence || 'scinote_template' @report.settings = Report::DEFAULT_SETTINGS if @report.settings.blank? @project_contents = {