mirror of https://github.com/go-gitea/gitea.git
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.
c40c753613
In MirrorRepositoryList.loadAttributes there is some code to load the Mirror entries from the database. This assumes that every Repository which has IsMirror set has a Mirror associated in the DB. This association is incorrect in the case of Mirror repository under creation when there is no Mirror entry in the DB until completion. Unfortunately LoadAttributes makes this incorrect assumption and presumes that a Mirror will always be loaded. This then causes a panic. This PR simply double checks if there a Mirror before attempting to link back to its Repo. Unfortunately it should be expected that there may be other cases where this incorrect assumption causes further problems. Fix #20804 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> |
2 years ago | |
---|---|---|
.. | ||
admin | 3 years ago | |
appstate | 3 years ago | |
asymkey | 3 years ago | |
auth | 3 years ago | |
avatars | 3 years ago | |
db | 2 years ago | |
fixtures | 3 years ago | |
foreignreference | 3 years ago | |
git | 2 years ago | |
issues | 3 years ago | |
migrations | 3 years ago | |
organization | 3 years ago | |
packages | 3 years ago | |
perm | 3 years ago | |
project | 3 years ago | |
pull | 3 years ago | |
repo | 2 years ago | |
unit | 3 years ago | |
unittest | 3 years ago | |
user | 2 years ago | |
webhook | 3 years ago | |
action.go | 3 years ago | |
action_list.go | 3 years ago | |
action_test.go | 3 years ago | |
consistency.go | 3 years ago | |
error.go | 3 years ago | |
fixture_generation.go | 3 years ago | |
fixture_test.go | 3 years ago | |
main_test.go | 3 years ago | |
migrate.go | 3 years ago | |
migrate_test.go | 3 years ago | |
notification.go | 3 years ago | |
notification_test.go | 3 years ago | |
org.go | 3 years ago | |
org_team.go | 3 years ago | |
org_team_test.go | 3 years ago | |
org_test.go | 3 years ago | |
release.go | 3 years ago | |
repo.go | 3 years ago | |
repo_activity.go | 3 years ago | |
repo_collaboration.go | 3 years ago | |
repo_collaboration_test.go | 3 years ago | |
repo_test.go | 3 years ago | |
repo_transfer.go | 3 years ago | |
repo_transfer_test.go | 3 years ago | |
statistic.go | 3 years ago | |
task.go | 3 years ago | |
token.go | 3 years ago | |
token_test.go | 3 years ago | |
upload.go | 3 years ago | |
user.go | 3 years ago | |
user_heatmap.go | 3 years ago | |
user_heatmap_test.go | 3 years ago |