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.
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>
1 year ago
..
admin Replace `interface{}` with `any` (#25686) 1 year ago
auth Less naked returns (#25713) 1 year ago
devtest Make "cancel" buttons have proper type in modal forms (#25618) 1 year ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Replace `interface{}` with `any` (#25686) 1 year ago
feed Pass 'not' to commit count (#24473) 1 year ago
healthcheck Refactor `setting.Database.UseXXX` to methods (#23354) 1 year ago
misc Decouple the different contexts from each other (#24786) 1 year ago
org Fix empty project displayed in issue sidebar (#25802) 1 year ago
repo Fix empty project displayed in issue sidebar (#25802) 1 year ago
shared Fix inconsistent user profile layout across tabs (#25625) 1 year ago
user Fix notification list bugs (#25781) 1 year ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Fix all possible setting error related storages and added some tests (#23911) 1 year ago
goget.go Support SSH for go get (#24664) 1 year ago
home.go Refactor cookie (#24107) 1 year ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Group template helper functions, remove `Printf`, improve template error messages (#23982) 1 year ago
web.go Less naked returns (#25713) 1 year ago
webfinger.go Replace `interface{}` with `any` (#25686) 1 year ago