summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-04-25 16:28:19 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-04-25 16:28:19 +0800
commit74b2cd5efab062e6e65082677e2e802af7893f7b (patch)
treef0c66dbcb317e399b146dd99be93549e9b150d1b
parent720197b124bc537c9bb214e3dfeceebd60c5b049 (diff)
downloadgitlab-ce-31280-fix-showing-issues-from-pending-delete-projects.tar.gz
Follow feedback and add changelog entry31280-fix-showing-issues-from-pending-delete-projects
-rw-r--r--changelogs/unreleased/31280-fix-showing-issues-from-pending-delete-projects.yml4
-rw-r--r--lib/banzai/reference_parser/issue_parser.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/changelogs/unreleased/31280-fix-showing-issues-from-pending-delete-projects.yml b/changelogs/unreleased/31280-fix-showing-issues-from-pending-delete-projects.yml
new file mode 100644
index 00000000000..8bd697a589c
--- /dev/null
+++ b/changelogs/unreleased/31280-fix-showing-issues-from-pending-delete-projects.yml
@@ -0,0 +1,4 @@
+---
+title: Fix 500 error due to trying to show issues from pending deleting projects
+merge_request: 10894
+author:
diff --git a/lib/banzai/reference_parser/issue_parser.rb b/lib/banzai/reference_parser/issue_parser.rb
index a4e112f660e..649d41b4a91 100644
--- a/lib/banzai/reference_parser/issue_parser.rb
+++ b/lib/banzai/reference_parser/issue_parser.rb
@@ -16,7 +16,7 @@ module Banzai
readable_issues = Ability.
issues_readable_by_user(nodes2issues.values, user).to_set
- nodes2issues.each.with_object({}) do |(node, issue), result|
+ nodes2issues.each_with_object({}) do |(node, issue), result|
result[node] = issue if readable_issues.include?(issue)
end
end
@@ -27,7 +27,7 @@ module Banzai
nodes.map { |node| issues[node] }.compact.uniq
end
- # FIXME: We should not memories values which could ignore arguments!
+ # FIXME: We should not memorize values which could ignore arguments!
def issues_for_nodes(nodes)
@issues_for_nodes ||= grouped_objects_for_nodes(
nodes,