Description
- Gitea version (or commit ref): 1.12.2
- Git version: 2.27.0.windows.1
- Operating system: Windows Server 2019 Standard
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes https://try.gitea.io/hardi/pull-request-test/pulls/1/files
- No
- Not relevant
- Log gist: https://gist.github.com/parnic-sks/32d4e95c485e45a00e551342c0fedaf0
Description
We are using Gitea on a small team (5 programmers) and fairly regularly run into a case where the "Files Changed" tab on a pull request is no longer accessible with some variation on this error message:
1.12.2:
template: repo/diff/box:152:65: executing "repo/diff/box" at <0>: nil pointer evaluating *models.Review.Type
1.12.1:
template: repo/diff/section_unified:28:53: executing "repo/diff/section_unified" at <0>: nil pointer evaluating *models.Review.Type
We have sometimes been able to find the offending comment in the database and update its Review ID to the appropriate ID. This gets difficult when a lot of comments have been made on other PRs between noticing the problem and trying to fix it.
We don't have a specific reproduction case that triggers this, but in general it seems it is sometimes possible to fail to assign the appropriate review ID in a comment which then breaks the ability to review changes line-by-line on a given PR.
Screenshots
Nothing to show, really, since it's just an error. Loading the Files Changed tab attempts to GET /org/repo/pulls/:pull_id/files, which returns 500 and the above error as plain text.