fix: resolve drawing dropdown race condition and save PDF hash to export record
Detach EquipmentBox event before programmatically setting equipment to prevent async UpdateDrawingDropdownAsync from clearing the drawing selection and duplicating entries. Also update ExportRecord.PdfContentHash in StorePdfAsync so the web frontend can serve PDF downloads. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,17 @@ namespace FabWorks.Api.Services
|
||||
var wasUnchanged = previousHash != null && previousHash == contentHash;
|
||||
var isNewFile = await StoreBlobAsync(stream, contentHash, "pdf");
|
||||
|
||||
// Update the export record with the PDF content hash
|
||||
if (exportRecordId.HasValue)
|
||||
{
|
||||
var record = await _db.ExportRecords.FindAsync(exportRecordId.Value);
|
||||
if (record != null)
|
||||
{
|
||||
record.PdfContentHash = contentHash;
|
||||
await _db.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
return new FileUploadResult
|
||||
{
|
||||
ContentHash = contentHash,
|
||||
|
||||
Reference in New Issue
Block a user