fix(career): preserve reviewed profile values
CI and Deploy / test (pull_request) Successful in 4m39s
CI and Deploy / deploy (pull_request) Has been skipped

Keep extraction heuristics out of manual save, version, and import paths so reviewed locations, URLs, dates, and languages round-trip unchanged.
This commit is contained in:
cesnimda
2026-08-15 16:56:31 +02:00
parent a6cffe0473
commit f0b9b222ff
15 changed files with 277 additions and 37 deletions
@@ -253,7 +253,7 @@ public sealed partial class ProfileCvController : ControllerBase
merged.Metadata.UpdatedAtUtc = DateTimeOffset.UtcNow;
await _careerProfileService.SaveVersionAsync(user.Id, merged, $"{run.Trigger}:accepted", HttpContext.RequestAborted);
user.ProfileCvStructureJson = StructuredCvProfileJson.Serialize(merged);
user.ProfileCvStructureJson = StructuredCvProfileJson.SerializePersisted(merged);
if (string.IsNullOrWhiteSpace(user.ProfileCvText)) user.ProfileCvText = run.NormalizedText;
user.CurrentCvExtractionRunId = run.Id;
user.CurrentCvProfileVersion = merged.Metadata.ProfileVersion;
@@ -323,7 +323,7 @@ public sealed partial class ProfileCvController : ControllerBase
var user = await _users.GetUserAsync(User);
if (user is null) return Unauthorized();
var structuredCv = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
var structuredCv = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
var sourceText = string.IsNullOrWhiteSpace(request.SourceText)
? (string.IsNullOrWhiteSpace(user.ProfileCvText) ? null : user.ProfileCvText.Trim())
: request.SourceText.Trim();
@@ -427,7 +427,7 @@ public sealed partial class ProfileCvController : ControllerBase
var user = await _users.GetUserAsync(User);
if (user is null) return Unauthorized();
var structuredCv = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
var structuredCv = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
var sourceText = string.IsNullOrWhiteSpace(request.SourceText)
? (string.IsNullOrWhiteSpace(user.ProfileCvText) ? null : user.ProfileCvText.Trim())
: request.SourceText.Trim();