Commit f94c73df authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

fix: review initialize_nested_objects builds impossible feedback record for...

fix: review initialize_nested_objects builds impossible feedback record for mission that needs no feedback
parent 0865a285
Pipeline #39340 failed with stage
in 52 minutes and 51 seconds
......@@ -30,4 +30,4 @@ class ReviewSemestersController < ApplicationController
[hour: [:hours, :spv_mission_id, :activity]]]
)
end
end
\ No newline at end of file
end
module ReviewSemesterHelper
def initialize_nested_objects
@nested_objects = {}
@semester_process_volunteer.semester_process_volunteer_missions.each do |spvm|
@semester_process_volunteer.semester_process_volunteer_missions.need_feedback.each do |spvm|
@nested_objects[spvm.id.to_s] = { feedback: @semester_process_volunteer.semester_feedback_with_mission(spvm.mission) || SemesterFeedback.new }
end
@nested_objects
......@@ -75,4 +75,4 @@ module ReviewSemesterHelper
@volunteer = @semester_process_volunteer.volunteer
@missions = @semester_process_volunteer.missions
end
end
\ No newline at end of file
end
......@@ -12,11 +12,6 @@ module SemesterProcessVolunteerHelper
text
end
def assign_volunteer_attributes
@volunteer.assign_attributes(review_params[:volunteer_attributes]
.slice(:waive, :bank, :iban))
end
def render_missions(spv)
html = ""
spv.missions.each do |m|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment