Monorepo for Tangled tangled.org

appview: handle deleted repos in profile timeline #562

merged opened by oppi.li targeting master from push-nupxprsykpzq
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3lyfcpa5la722
+8 -4
Diff #0
+8 -4
appview/db/issues.go
··· 359 359 repoMap[string(repos[i].RepoAt())] = &repos[i] 360 360 } 361 361 362 - for issueAt := range issueMap { 363 - i := issueMap[issueAt] 364 - r := repoMap[string(i.RepoAt)] 365 - i.Repo = r 362 + for issueAt, i := range issueMap { 363 + if r, ok := repoMap[string(i.RepoAt)]; ok { 364 + i.Repo = r 365 + } else { 366 + // do not show up the issue if the repo is deleted 367 + // TODO: foreign key where? 368 + delete(issueMap, issueAt) 369 + } 366 370 } 367 371 368 372 // collect comments

History

1 round 0 comments
sign up or login to add to the discussion
oppi.li submitted #0
1 commit
expand
appview: handle deleted repos in profile timeline
expand 0 comments
pull request successfully merged