500 error after migrating repository and deleting team from old organisation #11167

Closed
opened 2025-11-02 09:29:33 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @satr-cowi on GitHub (Jul 5, 2023).

Description

We migrated a repository to a new organisation, and then deleted the team in the old organisation (and made a new replacment team in the new one). Pull requests that requested a review from the deleted team now cannot be viewed and just show a 500 error.

Error occurs in rendering the review_requested comment, as the team now comes back as "Null"

"2023/06/30 13:05:07 ...s/context/context.go:224:HTML() [E] Render failed: template: repo/issue/view_content/comments:737:72: executing "repo/issue/view_content/comments" at <.AssigneeTeam.Name>: nil pointer evaluating *models.Team.Name"

Data can all still be accessed from API (showing that the AssigneeTeam comes back as Null, just not rendering the web page)

Gitea Version

1.16.9

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

_

Operating System

Windows

How are you running Gitea?

Run on an internal windows server, using a gitea download from the website.

Database

PostgreSQL

Originally created by @satr-cowi on GitHub (Jul 5, 2023). ### Description We migrated a repository to a new organisation, and then deleted the team in the old organisation (and made a new replacment team in the new one). Pull requests that requested a review from the deleted team now cannot be viewed and just show a 500 error. Error occurs in rendering the review_requested comment, as the team now comes back as "Null" "2023/06/30 13:05:07 ...s/context/context.go:224:HTML() [E] Render failed: template: repo/issue/view_content/comments:737:72: executing "repo/issue/view_content/comments" at <.AssigneeTeam.Name>: nil pointer evaluating *models.Team.Name" Data can all still be accessed from API (showing that the AssigneeTeam comes back as Null, just not rendering the web page) ### Gitea Version 1.16.9 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/54358974/dc03d7e6-711c-4ebf-8525-bea5d12a124a) ### Git Version _ ### Operating System Windows ### How are you running Gitea? Run on an internal windows server, using a gitea download from the website. ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 09:29:34 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 5, 2023):

It should have been fixed in latest releases.

@wxiaoguang commented on GitHub (Jul 5, 2023): It should have been fixed in latest releases.
Author
Owner

@GiteaBot commented on GitHub (Sep 8, 2023):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Sep 8, 2023): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11167