Skip to content

Commit

Permalink
fix: adjust query for technical user creation (#1113)
Browse files Browse the repository at this point in the history
Refs: #1112
Reviewed-By: Evelyn Gurschler <evelyn.gurschler@bmw.de>
  • Loading branch information
Phil91 authored Oct 24, 2024
1 parent adfb1dd commit 4598a88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ public async Task HandleServiceAccountCreationCallback(Guid processId, Authentic
{
throw new ConflictException($"ServiceAccountId must be set for process {processId}");
}

if (processData.ServiceAccountVersion is null)
{
throw new UnexpectedConditionException("ServiceAccountVersion or IdentityVersion should never be null here");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public IAsyncEnumerable<Process> GetActiveProcesses(IEnumerable<ProcessTypeId> p

public Task<(ProcessTypeId ProcessTypeId, VerifyProcessData ProcessData, Guid? ServiceAccountId, Guid? ServiceAccountVersion)> GetProcessDataForServiceAccountCallback(Guid processId, IEnumerable<ProcessStepTypeId> processStepTypeIds) =>
dbContext.Processes
.AsNoTracking()
.Where(x => x.Id == processId)
.Select(x => new ValueTuple<ProcessTypeId, VerifyProcessData, Guid?, Guid?>(
x.ProcessTypeId,
Expand All @@ -126,6 +127,7 @@ public IAsyncEnumerable<Process> GetActiveProcesses(IEnumerable<ProcessTypeId> p

public Task<(ProcessTypeId ProcessTypeId, VerifyProcessData ProcessData, Guid? ServiceAccountId)> GetProcessDataForServiceAccountDeletionCallback(Guid processId, IEnumerable<ProcessStepTypeId>? processStepTypeIds) =>
dbContext.Processes
.AsNoTracking()
.Where(x => x.Id == processId && x.ProcessTypeId == ProcessTypeId.DIM_TECHNICAL_USER)
.Select(x => new ValueTuple<ProcessTypeId, VerifyProcessData, Guid?>(
x.ProcessTypeId,
Expand Down

0 comments on commit 4598a88

Please sign in to comment.