From 228aa88723f18647c6609037cd7ecc3d230152de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BE=D0=BB=D0=B8=D0=BA=D0=BE=D0=B2=20Maximillian?= =?UTF-8?q?=20=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Sat, 7 Nov 2026 11:23:46 +0300 Subject: [PATCH] fix(storage): read lab5 job fields in GetByID --- backend/internal/storage/postgres/attachments.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/internal/storage/postgres/attachments.go b/backend/internal/storage/postgres/attachments.go index 98b32ab5..9fb95fed 100644 --- a/backend/internal/storage/postgres/attachments.go +++ b/backend/internal/storage/postgres/attachments.go @@ -71,7 +71,8 @@ func (r *AttachmentRepo) CreateInTx(ctx context.Context, tx domain.Tx, a *domain func (r *AttachmentRepo) GetByID(ctx context.Context, id string) (*domain.Attachment, error) { const q = ` SELECT id, chat_id, owner_id, filename, content_type, size_bytes, sha256, - object_key, status, error_code, created_at, updated_at + object_key, status, error_code, created_at, updated_at, + attempts, next_attempt_at, locked_until, pipeline_version, staging_key FROM attachments WHERE id = $1::uuid ` @@ -80,7 +81,8 @@ func (r *AttachmentRepo) GetByID(ctx context.Context, id string) (*domain.Attach err := r.pool.QueryRow(ctx, q, id). Scan(&a.ID, &a.ChatID, &a.OwnerID, &a.Filename, &a.ContentType, &a.SizeBytes, &a.SHA256, &a.ObjectKey, &status, &a.ErrorCode, - &a.CreatedAt, &a.UpdatedAt) + &a.CreatedAt, &a.UpdatedAt, + &a.Attempts, &a.NextAttemptAt, &a.LockedUntil, &a.PipelineVersion, &a.StagingKey) if err != nil { return nil, notFound(err, "attachment", id) }