fix(cv): preserve attachment flags across generic letter writers
This commit is contained in:
@@ -266,6 +266,8 @@ public sealed class ApplicationAssetsService : IApplicationAssetsService
|
||||
}
|
||||
|
||||
await StageCoverLetterAsync(_db, job, next.Length == 0 ? null : next, source, aiAction, ct, documentSettings);
|
||||
// Retain dedicated-save draft readiness; generic/import/draft writers leave attachment flags alone.
|
||||
if (next.Length > 0) job.HasCoverLetter = true;
|
||||
|
||||
try { await _db.SaveChangesAsync(ct); }
|
||||
catch { _db.ChangeTracker.Clear(); throw; }
|
||||
@@ -358,7 +360,6 @@ public sealed class ApplicationAssetsService : IApplicationAssetsService
|
||||
string.IsNullOrWhiteSpace(aiAction) ? null : aiAction.Trim(), nextSettings);
|
||||
job.CoverLetterText = text;
|
||||
if (settings is not null) job.CoverLetterDocumentSettingsJson = nextSettings;
|
||||
if (!string.IsNullOrWhiteSpace(text)) job.HasCoverLetter = true;
|
||||
}
|
||||
|
||||
private Task<JobApplication?> LoadJobAsync(string ownerUserId, int jobApplicationId, CancellationToken ct) =>
|
||||
|
||||
Reference in New Issue
Block a user