Skip to content

Commit

Permalink
Fix so enrolment location id always saved
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulCooperWorkJustice committed Oct 16, 2024
1 parent ade6204 commit e67d9cd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/Domain/Entities/Participants/Participant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,8 @@ public Participant TransitionTo(EnrolmentStatus to)
public Participant SetEnrolmentLocation(int locationId, string? justificationReason)
{
EnrolmentLocationJustification = justificationReason;
if (CurrentLocation.Id == locationId)
{
EnrolmentLocation = null;
_enrolmentLocationId = null;
}
else
{
_enrolmentLocationId = locationId;
}
_enrolmentLocationId = locationId;

return this;
}

Expand Down

0 comments on commit e67d9cd

Please sign in to comment.