0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 20:24:51 +01:00
gitea/routers/web
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>
2023-07-12 16:10:35 +02:00
..
admin Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
auth Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
devtest Make "cancel" buttons have proper type in modal forms (#25618) 2023-07-03 14:04:50 +08:00
events
explore Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
feed
healthcheck
misc
org Fix empty project displayed in issue sidebar (#25802) 2023-07-12 16:10:35 +02:00
repo Fix empty project displayed in issue sidebar (#25802) 2023-07-12 16:10:35 +02:00
shared Fix inconsistent user profile layout across tabs (#25625) 2023-07-06 18:59:24 +00:00
user Fix notification list bugs (#25781) 2023-07-09 18:42:31 +00:00
auth.go
auth_windows.go
base.go
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
webfinger.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00