fix: add semster process creator as journal author in case current_user is volunteer

parent 057de166
Pipeline #39395 passed with stage
in 37 minutes and 12 seconds
......@@ -46,7 +46,8 @@ class ReviewSemestersController < ApplicationController
return unless spv.commited_at?
volunteer = spv.volunteer
semester_feedbacks = spv.semester_feedbacks
Journal.create(user: current_user, journalable: volunteer,
author = current_user.volunteer? ? @semester_process_volunteer.semester_process.creator : current_user
Journal.create(user: author, journalable: volunteer,
category: :feedback, title: "Semester Prozess Feedback vom #{I18n.l(}: ",
body: render_semester_feedbacks(semester_feedbacks))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment