-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull request created by deleted user can not be opened #29159
Comments
Was that user assigned to the PR or has left a review comment? For both I see some problems with deleted users. Or was the user just the poster of the PR? |
Could you test if #29161 fixes your problem? Otherwise we need more info. |
Thanks for looking into this!
The user created the PR and it is possible that he was assignee or left review comments. I am unable to tell whether this is the case, as I can not open the PR.
I am unable to deploy unofficial releases into the production infrastructure this is occurring on. How would you recommend obtaining additional information about the cause of the issue? |
If you have access to the database, check if one of these queries has a result. If yes, then #29161 will fix your issue. select * from comment join issue on (issue.id = comment.issue_id) where assignee_id = 47 and issue.index = ?
select * from review join issue on (issue.id = review.issue_id) where reviewer_id = 47 and issue.index = ? Replace the |
Yep, that seems to be the issue then.
returns two rows and
Returns one row for the PR in question Thanks again for the quick responses! |
Then you can just change the |
Yep, that worked, thanks a lot again for your help! Feel free to close this issue now or once the PR is merged. |
wait for backport |
Backport was already done in #29169. |
Fixes go-gitea#29159 (cherry picked from commit 37061e8)
Description
One of our users created a pull request and his account was deleted later on. Attempting to open this pull request results in the standard error page with return code 500. Other pull requests created by the same account are fine.
Attempting to open the pull requests results in Gitea logging the following line:
2024/02/13 11:32:58 ...rs/web/repo/issue.go:1405:ViewIssue() [E] LoadAttributes: user does not exist [uid: 47, name: , keyid: 0]
Behavior is independent of the permissions of the account used to open the page. No other errors are logged.
Gitea Version
v1.21.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Debian 12
How are you running Gitea?
Packages provided by gitea on Github
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: