fix(database): qualify RD21 saves against pinned MariaDB 12.2.2
This commit is contained in:
@@ -939,7 +939,7 @@ Canonical profile:
|
||||
_db.ChangeTracker.Clear();
|
||||
return Conflict(new { code = "revision_conflict", message = "This job changed while saving. Your draft was not saved. Reload and review before saving again." });
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
catch
|
||||
{
|
||||
_db.ChangeTracker.Clear();
|
||||
throw;
|
||||
|
||||
@@ -216,8 +216,11 @@ public sealed partial class ProfileCvController : ControllerBase
|
||||
|
||||
var runsQuery = _db.CvExtractionRuns
|
||||
.AsNoTracking()
|
||||
.Where(x => x.OwnerUserId == user.Id)
|
||||
.Select(x => new CvExtractionRunListItem(
|
||||
.Where(x => x.OwnerUserId == user.Id);
|
||||
var isSqlite = _db.Database.IsSqlite();
|
||||
if (!isSqlite)
|
||||
runsQuery = runsQuery.OrderByDescending(x => x.StartedAtUtc).Take(10);
|
||||
var runs = await runsQuery.Select(x => new CvExtractionRunListItem(
|
||||
x.Id,
|
||||
x.Trigger,
|
||||
x.Status,
|
||||
@@ -229,10 +232,9 @@ public sealed partial class ProfileCvController : ControllerBase
|
||||
x.NormalizerVersion,
|
||||
x.LlmPromptVersion,
|
||||
x.ErrorMessage,
|
||||
null));
|
||||
var runs = _db.Database.IsSqlite()
|
||||
? (await runsQuery.ToListAsync(HttpContext.RequestAborted)).OrderByDescending(x => x.StartedAtUtc).Take(10).ToList()
|
||||
: await runsQuery.OrderByDescending(x => x.StartedAtUtc).Take(10).ToListAsync(HttpContext.RequestAborted);
|
||||
null)).ToListAsync(HttpContext.RequestAborted);
|
||||
if (isSqlite)
|
||||
runs = runs.OrderByDescending(x => x.StartedAtUtc).Take(10).ToList();
|
||||
|
||||
var runIds = runs.Select(run => run.Id.ToString(System.Globalization.CultureInfo.InvariantCulture)).ToList();
|
||||
var operations = await _db.UserOperations.AsNoTracking()
|
||||
|
||||
Reference in New Issue
Block a user