From cff560dec2359007c4d0e68155d8ffafb184937e Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Fri, 31 Oct 2025 16:12:18 +0000 Subject: [PATCH] appview/db/pulls: fix PR existence check 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(s) changed, 1 insertion(s)(+), 1 deletion(s)(-) diff --git a/appview/db/pulls.go b/appview/db/pulls.go --- a/appview/db/pulls.go +++ b/appview/db/pulls.go @@ -347,7 +347,7 @@ pulls, err := GetPullsWithLimit(e, 1, FilterEq("repo_at", repoAt), FilterEq("pull_id", pullId)) if err != nil { return nil, err } - if pulls == nil { + if len(pulls) == 0 { return nil, sql.ErrNoRows } -- tangled.sh