Monorepo for Tangled tangled.org

appview/db/pulls: fix PR existence check #733

merged opened by boltless.me targeting master from push-pxkksnmwqzwo

empty slice/array with 0 length can not be nil, check with length instead

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m4iutiktxe22
+1 -1
Diff #0
+1 -1
appview/db/pulls.go
··· 347 347 if err != nil { 348 348 return nil, err 349 349 } 350 - if pulls == nil { 350 + if len(pulls) == 0 { 351 351 return nil, sql.ErrNoRows 352 352 } 353 353

History

1 round 0 comments
sign up or login to add to the discussion
boltless.me submitted #0
1 commit
expand
appview/db/pulls: fix PR existence check
3/3 success
expand
expand 0 comments
pull request successfully merged