nil pointer evaluating *models.Review.Type #5825

Closed
opened 2025-11-02 06:36:59 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @bendem on GitHub (Aug 4, 2020).

  • Gitea version (or commit ref): 1.12.3
  • Git version: N/a
  • Operating system: the docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
server_1  | [Macaron] 2020-08-04 08:47:31: Started GET /dsi.architecture/infra/pulls/23/files for 192.168.83.155
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 4.449127ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "lower_name"=$1 LIMIT 1 [dsi.architecture] - 4.915029ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "owner_id"=$1 AND "lower_name"=$2 LIMIT 1 [3 infra] - 4.284525ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 3.44012ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "type", "config", "created_unix" FROM "repo_unit" WHERE (repo_id = $1) [3] - 3.254219ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 11.979771ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 5.697134ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT count(*) FROM "release" WHERE repo_id=$1 AND is_draft=$2 [3 false] - 4.381326ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE (owner_id=$1 AND fork_id=$2) LIMIT 1 [1 3] - 4.181325ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 7.139642ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 4.230625ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE (owner_id=$1 AND fork_id=$2) LIMIT 1 [1 3] - 7.295943ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] UPDATE "user" SET "diff_view_style" = $1, "updated_unix" = $2 WHERE "id"=$3 [split 1596523651 1] - 5.792235ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "index", "poster_id", "original_author", "original_author_id", "name", "content", "milestone_id", "priority", "is_closed", "is_pull", "num_comments", "ref", "deadline_unix", "created_unix", "updated_unix", "closed_unix", "is_locked" FROM "issue" WHERE "repo_id"=$1 AND "index"=$2 LIMIT 1 [3 23] - 4.412526ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [2] - 6.872541ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "id"=$1 LIMIT 1 [3] - 3.960024ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "status", "conflicted_files", "commits_ahead", "commits_behind", "issue_id", "index", "head_repo_id", "base_repo_id", "head_branch", "base_branch", "merge_base", "has_merged", "merged_commit_id", "merger_id", "merged_unix" FROM "pull_request" WHERE "issue_id"=$1 LIMIT 1 [33] - 4.485427ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] UPDATE "issue_user" SET is_read=$1 WHERE uid=$2 AND issue_id=$3 [true 1 33] - 4.048424ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "status", "source", "issue_id", "commit_id", "comment_id", "updated_by", "created_unix", "updated_unix" FROM "notification" WHERE (user_id = $1) AND (issue_id = $2) LIMIT 1 [1 33] - 4.339125ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 main] - 3.997023ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 4.439827ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [3] - 4.545728ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "type", "config", "created_unix" FROM "repo_unit" WHERE (repo_id = $1) [3] - 8.038848ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 12.377574ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 6.400538ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "id"=$1 LIMIT 1 [3] - 4.691628ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 features/docker/odoo] - 4.267526ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 features/docker/odoo] - 4.936929ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT max( id ) as id FROM "commit_status" WHERE (repo_id = $1) AND (sha = $2) GROUP BY context_hash ORDER BY max( id ) desc LIMIT 10 [3 debe92a7f748ac310c51a1c8d2a4bb8ba3d74d7a] - 4.580427ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "poster_id", "original_author", "original_author_id", "issue_id", "label_id", "old_milestone_id", "milestone_id", "assignee_id", "removed_assignee", "resolve_doer_id", "old_title", "new_title", "old_ref", "new_ref", "dependent_issue_id", "commit_id", "line", "tree_path", "content", "patch", "created_unix", "updated_unix", "commit_sha", "review_id", "invalidated", "ref_repo_id", "ref_issue_id", "ref_comment_id", "ref_action", "ref_is_pull" FROM "comment" WHERE comment.issue_id=$1 AND comment.type=$2 AND invalidated=$3 ORDER BY "comment"."created_unix" ASC, "comment"."id" ASC [33 21 false] - 4.126024ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id" IN ($1,$2) [1 2] - 5.187331ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "reviewer_id", "original_author", "original_author_id", "issue_id", "content", "official", "commit_id", "stale", "created_unix", "updated_unix" FROM "review" WHERE "id" IN ($1,$2) [58 58] - 4.326326ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 7.528445ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT team.lower_name FROM "team_repo" INNER JOIN "team" ON team.id = team_repo.team_id WHERE (team_repo.repo_id = $1) ORDER BY team.lower_name [3] - 5.117131ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 4.110224ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 4.059124ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 8.306649ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 4.879929ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE (repo_id = $1 AND mode >= $2) [3 write] - 4.203025ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id" IN ($1,$2,$3,$4) [1 2 9 7] - 4.888029ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "reviewer_id", "original_author", "original_author_id", "issue_id", "content", "official", "commit_id", "stale", "created_unix", "updated_unix" FROM "review" WHERE issue_id=$1 AND reviewer_id=$2 AND type=$3 ORDER BY "created_unix" ASC, "id" ASC [33 1 0] - 8.040648ms
server_1  | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) [1 1] - 7.332044ms
server_1  | [Macaron] 2020-08-04 08:47:31: Completed GET /dsi.architecture/infra/pulls/23/files 500 Internal Server Error in 314.164168ms

Description

After commenting on a line of a diff in a PR, the diff is now inaccessible with the following error:

template: repo/diff/box:152:65: executing "repo/diff/box" at <0>: nil pointer evaluating *models.Review.Type

The PR summary and commit tabs are still available, but the diff is not.

Originally created by @bendem on GitHub (Aug 4, 2020). - Gitea version (or commit ref): 1.12.3 - Git version: N/a - Operating system: the docker image - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: <details> ``` server_1 | [Macaron] 2020-08-04 08:47:31: Started GET /dsi.architecture/infra/pulls/23/files for 192.168.83.155 server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 4.449127ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "lower_name"=$1 LIMIT 1 [dsi.architecture] - 4.915029ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "owner_id"=$1 AND "lower_name"=$2 LIMIT 1 [3 infra] - 4.284525ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 3.44012ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "type", "config", "created_unix" FROM "repo_unit" WHERE (repo_id = $1) [3] - 3.254219ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 11.979771ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 5.697134ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT count(*) FROM "release" WHERE repo_id=$1 AND is_draft=$2 [3 false] - 4.381326ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE (owner_id=$1 AND fork_id=$2) LIMIT 1 [1 3] - 4.181325ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 7.139642ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 4.230625ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE (owner_id=$1 AND fork_id=$2) LIMIT 1 [1 3] - 7.295943ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] UPDATE "user" SET "diff_view_style" = $1, "updated_unix" = $2 WHERE "id"=$3 [split 1596523651 1] - 5.792235ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "index", "poster_id", "original_author", "original_author_id", "name", "content", "milestone_id", "priority", "is_closed", "is_pull", "num_comments", "ref", "deadline_unix", "created_unix", "updated_unix", "closed_unix", "is_locked" FROM "issue" WHERE "repo_id"=$1 AND "index"=$2 LIMIT 1 [3 23] - 4.412526ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [2] - 6.872541ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "id"=$1 LIMIT 1 [3] - 3.960024ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "status", "conflicted_files", "commits_ahead", "commits_behind", "issue_id", "index", "head_repo_id", "base_repo_id", "head_branch", "base_branch", "merge_base", "has_merged", "merged_commit_id", "merger_id", "merged_unix" FROM "pull_request" WHERE "issue_id"=$1 LIMIT 1 [33] - 4.485427ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:277:ExecContext() [I] [SQL] UPDATE "issue_user" SET is_read=$1 WHERE uid=$2 AND issue_id=$3 [true 1 33] - 4.048424ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "status", "source", "issue_id", "commit_id", "comment_id", "updated_by", "created_unix", "updated_unix" FROM "notification" WHERE (user_id = $1) AND (issue_id = $2) LIMIT 1 [1 33] - 4.339125ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 main] - 3.997023ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 4.439827ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [3] - 4.545728ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "type", "config", "created_unix" FROM "repo_unit" WHERE (repo_id = $1) [3] - 8.038848ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 12.377574ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 6.400538ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "owner_id", "owner_name", "lower_name", "name", "description", "website", "original_service_type", "original_url", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_empty", "is_archived", "is_mirror", "status", "is_fork", "fork_id", "is_template", "template_id", "size", "is_fsck_enabled", "close_issues_via_commit_in_any_branch", "topics", "avatar", "created_unix", "updated_unix" FROM "repository" WHERE "id"=$1 LIMIT 1 [3] - 4.691628ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 features/docker/odoo] - 4.267526ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "whitelist_deploy_keys", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "enable_status_check", "status_check_contexts", "enable_approvals_whitelist", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "block_on_rejected_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 [3 features/docker/odoo] - 4.936929ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT max( id ) as id FROM "commit_status" WHERE (repo_id = $1) AND (sha = $2) GROUP BY context_hash ORDER BY max( id ) desc LIMIT 10 [3 debe92a7f748ac310c51a1c8d2a4bb8ba3d74d7a] - 4.580427ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "poster_id", "original_author", "original_author_id", "issue_id", "label_id", "old_milestone_id", "milestone_id", "assignee_id", "removed_assignee", "resolve_doer_id", "old_title", "new_title", "old_ref", "new_ref", "dependent_issue_id", "commit_id", "line", "tree_path", "content", "patch", "created_unix", "updated_unix", "commit_sha", "review_id", "invalidated", "ref_repo_id", "ref_issue_id", "ref_comment_id", "ref_action", "ref_is_pull" FROM "comment" WHERE comment.issue_id=$1 AND comment.type=$2 AND invalidated=$3 ORDER BY "comment"."created_unix" ASC, "comment"."id" ASC [33 21 false] - 4.126024ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id" IN ($1,$2) [1 2] - 5.187331ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "reviewer_id", "original_author", "original_author_id", "issue_id", "content", "official", "commit_id", "stale", "created_unix", "updated_unix" FROM "review" WHERE "id" IN ($1,$2) [58 58] - 4.326326ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 7.528445ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT team.lower_name FROM "team_repo" INNER JOIN "team" ON team.id = team_repo.team_id WHERE (team_repo.repo_id = $1) ORDER BY team.lower_name [3] - 5.117131ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id"=$1 LIMIT 1 [1] - 4.110224ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "repo_id", "user_id", "mode" FROM "collaboration" WHERE "repo_id"=$1 AND "user_id"=$2 LIMIT 1 [3 1] - 4.059124ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 [1 3] - 8.306649ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT * FROM "team" INNER JOIN "team_user" ON team_user.team_id = team.id INNER JOIN "team_repo" ON team_repo.team_id = team.id WHERE (team.org_id = $1) AND (team_user.uid=$2) AND (team_repo.repo_id=$3) [3 1 3] - 4.879929ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "user_id", "repo_id", "mode" FROM "access" WHERE (repo_id = $1 AND mode >= $2) [3 write] - 4.203025ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme" FROM "user" WHERE "id" IN ($1,$2,$3,$4) [1 2 9 7] - 4.888029ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT "id", "type", "reviewer_id", "original_author", "original_author_id", "issue_id", "content", "official", "commit_id", "stale", "created_unix", "updated_unix" FROM "review" WHERE issue_id=$1 AND reviewer_id=$2 AND type=$3 ORDER BY "created_unix" ASC, "id" ASC [33 1 0] - 8.040648ms server_1 | 2020/08/04 08:47:31 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) [1 1] - 7.332044ms server_1 | [Macaron] 2020-08-04 08:47:31: Completed GET /dsi.architecture/infra/pulls/23/files 500 Internal Server Error in 314.164168ms ``` </details> ## Description After commenting on a line of a diff in a PR, the diff is now inaccessible with the following error: ``` template: repo/diff/box:152:65: executing "repo/diff/box" at <0>: nil pointer evaluating *models.Review.Type ``` The PR summary and commit tabs are still available, but the diff is not.
Author
Owner

@bendem commented on GitHub (Aug 4, 2020):

Duplicate of #12239

@bendem commented on GitHub (Aug 4, 2020): Duplicate of #12239
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5825