You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models
yp05327 8b89563bf1
Fix empty project displayed in issue sidebar (#25802)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/1ab476dc-2f9b-4c85-9e87-105fc73af1ee)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/786f984d-5c27-4eff-b3d9-159f68034ce4)

This issue comes from the change in #25468.
`LoadProject` will always return at least one record, so we use
`ProjectID` to check whether an issue is linked to a project in the old
code.
As other `issue.LoadXXX` functions, we need to check the return value
from `xorm.Session.Get`.

In recent unit tests, we only test `issueList.LoadAttributes()` but
don't test `issue.LoadAttributes()`. So I added a new test for
`issue.LoadAttributes()` in this PR.

---------

Co-authored-by: Denys Konovalov <privat@denyskon.de>
12 months ago
..
actions Fix content holes in Actions task logs file (#25560) 1 year ago
activities Update tool dependencies, lock govulncheck and actionlint (#25655) 12 months ago
admin Replace `interface{}` with `any` (#25686) 1 year ago
asymkey Update tool dependencies, lock govulncheck and actionlint (#25655) 12 months ago
auth Less naked returns (#25713) 1 year ago
avatars Avoid warning for system setting when start up (#23054) 1 year ago
db Replace `interface{}` with `any` (#25686) 1 year ago
dbfs Fix content holes in Actions task logs file (#25560) 1 year ago
fixtures Fix incorrect oldest sort in project list (#25806) 12 months ago
git Exclude default branch from pushed branch hint (#25795) 12 months ago
issues Fix empty project displayed in issue sidebar (#25802) 12 months ago
migrations Update tool dependencies, lock govulncheck and actionlint (#25655) 12 months ago
organization Remove unused code (#25734) 1 year ago
packages Test if container blob is accessible before mounting (#22759) 12 months ago
perm some less naked returns (#25682) 1 year ago
project Fix incorrect oldest sort in project list (#25806) 12 months ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo For API attachments, use API URL (#25639) 12 months ago
secret Support configuration variables on Gitea Actions (#24724) 1 year ago
shared/types Display owner of a runner as a tooltip instead of static text (#24377) 1 year ago
system Replace `interface{}` with `any` (#25686) 1 year ago
unit Rewrite logger system (#24726) 1 year ago
unittest Replace `interface{}` with `any` (#25686) 1 year ago
user Fix inconsistent user profile layout across tabs (#25625) 1 year ago
webhook Replace `interface{}` with `any` (#25686) 1 year ago
error.go Sync branches into databases (#22743) 1 year ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Merge setting.InitXXX into one function with options (#24389) 1 year ago
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Remove org users who belong to no teams (#24247) 1 year ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Update tool dependencies, lock govulncheck and actionlint (#25655) 12 months ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 1 year ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Fix unclear `IsRepositoryExist` logic (#24374) 1 year ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago