1
0
Fork 0
forked from forgejo/forgejo

Prevent NPE on commenting on lines with invalidated comments (with migration) (#12549)

* Prevent NPE on commenting on lines with invalidated comments

Only check for a review if we are replying to a previous review.

Prevent the NPE in #12239 by assuming that a comment without a Review is
non-pending.

Fix #12239

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add hack around to show the broken comments

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add migration and remove template hacks

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2020-08-21 08:53:14 +01:00 committed by GitHub
parent c6943cca52
commit 9c9c3348bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 135 additions and 1 deletions

View file

@ -226,6 +226,8 @@ var migrations = []Migration{
NewMigration("Increase Language field to 50 in LanguageStats", increaseLanguageField),
// v146 -> v147
NewMigration("Add projects info to repository table", addProjectsInfo),
// v147 -> v148
NewMigration("create review for 0 review id code comments", createReviewsForCodeComments),
}
// GetCurrentDBVersion returns the current db version