From 60f1a918da7d11789a6604f182dc285976a09e1d 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 13:54:53 +0800 Subject: [PATCH] fix error --- .../admin/application_forms_controller.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/application_forms_controller.rb b/app/controllers/admin/application_forms_controller.rb index 9602535..99bdade 100644 --- a/app/controllers/admin/application_forms_controller.rb +++ b/app/controllers/admin/application_forms_controller.rb @@ -428,7 +428,10 @@ class Admin::ApplicationFormsController < OrbitAdminController end def copy @application_form = ApplicationFormMain.find(params[:id]).clone_new - @member = MemberProfile.where(:id.in=>@application_form.reviewer_ids).to_a + @member_1st = MemberProfile.where(:id.in=>@application_form.reviewer_1st_ids).to_a rescue [] + @member_2nd = MemberProfile.where(:id.in=>@application_form.reviewer_2nd_ids).to_a rescue [] + @member_3rd = MemberProfile.where(:id.in=>@application_form.reviewer_3rd_ids).to_a rescue [] + @email_set = @application_form.application_form_email_sets @signup_sets = @application_form.application_form_signup_field_sets @submission_set = @application_form.application_form_submission_field_sets @@ -437,7 +440,9 @@ class Admin::ApplicationFormsController < OrbitAdminController @review = @application_form.application_form_reviews.first end def new - @member = nil + @member_1st = nil + @member_2nd = nil + @member_3rd = nil @application_form = ApplicationFormMain.new create_set (false) @signup_sets = @application_form.application_form_signup_field_sets @@ -523,7 +528,9 @@ class Admin::ApplicationFormsController < OrbitAdminController @signup_sets = @application_form.application_form_signup_field_sets @submission_set = @application_form.application_form_submission_field_sets @custom_set = @application_form.application_form_signup_field_customs - @member = MemberProfile.where(:id.in=>@application_form.reviewer_ids).to_a rescue [] + @member_1st = MemberProfile.where(:id.in=>@application_form.reviewer_1st_ids).to_a rescue [] + @member_2nd = MemberProfile.where(:id.in=>@application_form.reviewer_2nd_ids).to_a rescue [] + @member_3rd = MemberProfile.where(:id.in=>@application_form.reviewer_3rd_ids).to_a rescue [] if (@application_form.organizer_id == current_user.member_profile_id rescue false) @user_authorized_categories = @module_app.categories.enabled.to_a else