From 0d498da57d0d38645d77dbf86491e91f85f5e2d9 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Sat, 1 Nov 2025 01:12:18 +0900 Subject: [PATCH] appview/db/pulls: fix PR existence check Change-Id: ksunokxwlxmwuwmvyrkrposwlpzzkrmk empty slice/array with 0 length can not be nil, check with length instead Signed-off-by: Seongmin Lee --- appview/db/pulls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appview/db/pulls.go b/appview/db/pulls.go index 99b0a7c0..ff5d2def 100644 --- a/appview/db/pulls.go +++ b/appview/db/pulls.go @@ -347,7 +347,7 @@ func GetPull(e Execer, repoAt syntax.ATURI, pullId int) (*models.Pull, error) { if err != nil { return nil, err } - if pulls == nil { + if len(pulls) == 0 { return nil, sql.ErrNoRows } -- 2.43.0