Skip to content

Commit

Permalink
Allow candidates to apply for previously unsuccessful courses
Browse files Browse the repository at this point in the history
We allow candidates to reapply for courses provided they have been
previously unsuccessful with the choice. We need to replicate this
for the apply from Find journey.
  • Loading branch information
JR-G committed Oct 11, 2023
1 parent d02bf2f commit 2de262d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/application_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def editable?

def contains_course?(course)
potential_course_option_ids = CourseOption.where(course_id: course.id).map(&:id)
current_course_option_ids = application_choices.map(&:course_option_id)
current_course_option_ids = application_choices.where({ status: ApplicationStateChange::NON_REAPPLY_STATUSES }).map(&:course_option_id)

potential_course_option_ids.intersect?(current_course_option_ids)
end
Expand Down

0 comments on commit 2de262d

Please sign in to comment.