Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ public async Task<GenerateTestCasesResult> GenerateAsync(
// only looks at whether a spec is attached, not whether generation actually finished.
await using var transaction = await db.Database.BeginTransactionAsync(cancellationToken);

int previousVersion = await db
.Set<TestCaseGenerationSpec>()
.Where(s => s.ProblemSetupId == request.ProblemSetupId)
.Select(s => s.Version)
.DefaultIfEmpty(0)
.MaxAsync(cancellationToken);
int previousVersion =
await db
.Set<TestCaseGenerationSpec>()
.Where(s => s.ProblemSetupId == request.ProblemSetupId)
.MaxAsync(s => (int?)s.Version, cancellationToken) ?? 0;

var spec = new TestCaseGenerationSpec(
request.ProblemSetupId,
Expand Down
Loading