Skip to content

Commit

Permalink
Adaptation pour Fregata
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Nov 14, 2024
1 parent 8b7297a commit 32b9eb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/student/mappers/fregata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def map_schooling!(classe, student, entry)

schooling.status = schooling_attributes[:status]

student.close_current_schooling! if schooling.open? && student.current_schooling != schooling
if schooling.open?
student.close_current_schooling! if student.current_schooling != schooling
elsif schooling_attributes[:end_date].nil?
schooling.reopen!
end

schooling.save!
end
Expand Down

0 comments on commit 32b9eb0

Please sign in to comment.