Skip to content

Commit

Permalink
Update TeacherTrainingAdviserSignUp.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
martyn-w committed Jan 9, 2025
1 parent ce4e9c1 commit 770af94
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public enum ResubscribableAdviserStatus
[SwaggerSchema(WriteOnly = true)]
public int? CreationChannelActivityId { get; set; }


public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
Expand Down Expand Up @@ -259,16 +258,15 @@ private void ConfigureChannel(Candidate candidate)
{
if (CandidateId == null)
{
if (CreationChannelSourceId.HasValue && CreationChannelServiceId.HasValue &&
CreationChannelActivityId.HasValue)
if (CreationChannelSourceId.HasValue)
{
candidate.ChannelId = null;
candidate.ContactChannelCreations.Add(new ContactChannelCreation()
{
CreationChannel = true,
CreationChannelSourceId = CreationChannelSourceId.Value,
CreationChannelServiceId = CreationChannelServiceId.Value,
CreationChannelActivityId = CreationChannelActivityId.Value,
CreationChannelServiceId = CreationChannelServiceId,
CreationChannelActivityId = CreationChannelActivityId,
});
}
else
Expand All @@ -281,15 +279,14 @@ private void ConfigureChannel(Candidate candidate)
// NB: we do not update a candidate's ChannelId for an existing record
// NB: CreationChannel should be true only if it is the first ContactChannelCreation record

if (CreationChannelSourceId.HasValue && CreationChannelServiceId.HasValue &&
CreationChannelActivityId.HasValue)
if (CreationChannelSourceId.HasValue)
{
candidate.ContactChannelCreations.Add(new ContactChannelCreation()
{
CreationChannel = !candidate.ContactChannelCreations.Any(),
CreationChannelSourceId = CreationChannelSourceId.Value,
CreationChannelServiceId = CreationChannelServiceId.Value,
CreationChannelActivityId = CreationChannelActivityId.Value,
CreationChannelServiceId = CreationChannelServiceId,
CreationChannelActivityId = CreationChannelActivityId,
});
}
}
Expand Down

0 comments on commit 770af94

Please sign in to comment.