Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-14 15:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-14 15:08:03 +0300
commit61a82b8ec062d6f122dadd38783c7754cef7ce2b (patch)
tree071d1ded4f507d77bac97156aa1fa85c95c0cba5 /app/models/note.rb
parent3ed578edf525bce3167860b84f6b43bab5065cf5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index c8ed265ac93..8e1f4979602 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -748,7 +748,8 @@ class Note < ApplicationRecord
if user_visible_reference_count.present? && total_reference_count.present?
# if they are not equal, then there are private/confidential references as well
- user_visible_reference_count > 0 && user_visible_reference_count == total_reference_count
+ total_reference_count == 0 ||
+ user_visible_reference_count > 0 && user_visible_reference_count == total_reference_count
else
refs = all_references(user)
refs.all.any? && refs.all_visible?