diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs index 7e1a28fe8b..667e18bcf8 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs @@ -56,7 +56,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService, return new Success(new ScimInviteOrganizationUsersResponse { - InvitedUser = result.Value.FirstOrDefault() + InvitedUser = user }); default: diff --git a/src/Core/Models/Commands/CommandResult.cs b/src/Core/Models/Commands/CommandResult.cs index 3f906de2d5..d775289b8f 100644 --- a/src/Core/Models/Commands/CommandResult.cs +++ b/src/Core/Models/Commands/CommandResult.cs @@ -32,10 +32,10 @@ public abstract class CommandResult { } public class Success(T value) : CommandResult { - public T? Value { get; } = value; + public T Value { get; } = value; } -public class Failure(IEnumerable errorMessage) : CommandResult +public class Failure(IEnumerable errorMessages) : CommandResult { public List ErrorMessages { get; } = [];