We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bf912c5 + 63041e5 commit 64f121aCopy full SHA for 64f121a
1 file changed
app/models/patient_changeset.rb
@@ -290,9 +290,12 @@ def school_move
290
school_move =
291
patient.school_moves.includes(:school_teams).first ||
292
SchoolMove.new(patient:)
293
+
294
+ # TODO: Simplify this once we no longer have changesets with
295
+ # `school_id` set to `nil`.
296
school_move.assign_attributes(
- # TODO: Simplify this once we no longer have changesets with
- # `school_id` set to `nil`.
297
+ academic_year:,
298
+ home_educated: nil,
299
school:
300
school ||
301
(
@@ -302,9 +305,10 @@ def school_move
302
305
team.unknown_school
303
306
end
304
307
),
- academic_year:,
308
+ team_id: nil,
309
source: school_move_source
310
)
311
312
# TODO: Figure out why this is necessary.
313
school_move.strict_loading!(false)
314
school_move
0 commit comments