From a5bc3285c741dbc903c54933172da0533842a441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Thu, 10 Mar 2022 14:14:52 +0800 Subject: [PATCH] fix error --- app/helpers/admin/application_forms_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/admin/application_forms_helper.rb b/app/helpers/admin/application_forms_helper.rb index fe247ed..473057b 100644 --- a/app/helpers/admin/application_forms_helper.rb +++ b/app/helpers/admin/application_forms_helper.rb @@ -10,7 +10,7 @@ module Admin::ApplicationFormsHelper pages.each do |page| if page.categories.count ==1 - if page.categories.include?(application_form.category.id.to_s) rescue false + if (page.categories.include?(application_form.category.id.to_s) rescue false) ann_page = page end end @@ -19,7 +19,7 @@ module Admin::ApplicationFormsHelper if ann_page.nil? pages.each do |page| - if page.categories.include?(application_form.category.id.to_s) rescue false + if (page.categories.include?(application_form.category.id.to_s) rescue false) ann_page = page end break if !ann_page.nil?