From 0c172eb82f4eb392f1e4e9d791451946a795be00 Mon Sep 17 00:00:00 2001 From: PaulCooperWorkJustice Date: Wed, 16 Oct 2024 11:51:07 +0100 Subject: [PATCH] Fix so enrolment location id always saved --- src/Domain/Entities/Participants/Participant.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Domain/Entities/Participants/Participant.cs b/src/Domain/Entities/Participants/Participant.cs index 92b74fe7..fe957fe3 100644 --- a/src/Domain/Entities/Participants/Participant.cs +++ b/src/Domain/Entities/Participants/Participant.cs @@ -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; }