From b6b3b94819a4ce8b1810afdfbbab17ede34a997e 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: Thu, 22 Oct 2026 18:16:07 +0300 Subject: [PATCH] fix(postgres):lab4 non-nil empty slice in ListStalePending --- backend/internal/storage/postgres/attachments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/storage/postgres/attachments.go b/backend/internal/storage/postgres/attachments.go index c824e8c7..915b1f13 100644 --- a/backend/internal/storage/postgres/attachments.go +++ b/backend/internal/storage/postgres/attachments.go @@ -136,7 +136,7 @@ func (r *AttachmentRepo) MarkFailed(ctx context.Context, id, errorCode string) e func (r *AttachmentRepo) ListStalePending(ctx context.Context, olderThan time.Time, limit int) ([]domain.Attachment, error) { if limit <= 0 { - return nil, nil + return []domain.Attachment{}, nil } const q = ` SELECT id, chat_id, owner_id, filename, content_type, size_bytes, sha256,