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>2021-12-18 03:14:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-18 03:14:00 +0300
commite1d036885e2f5720e847d9009f60c5d7baad0015 (patch)
tree2fd1a36b792ff2e7d71944d28cb1473dfe22cde4 /app/models/concerns/issuable.rb
parent6bdb805dc87064d97d303ce8864f30e48663c6e9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r--app/models/concerns/issuable.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 1f05aa0954d..dcd80201d3f 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -66,6 +66,11 @@ module Issuable
# We check first if we're loaded to not load unnecessarily.
loaded? && to_a.all? { |note| note.association(:project).loaded? }
end
+
+ def system_note_metadata_loaded?
+ # We check first if we're loaded to not load unnecessarily.
+ loaded? && to_a.all? { |note| note.association(:system_note_metadata).loaded? }
+ end
end
has_many :note_authors, -> { distinct }, through: :notes, source: :author
@@ -534,6 +539,7 @@ module Issuable
includes << :author unless notes.authors_loaded?
includes << :award_emoji unless notes.award_emojis_loaded?
includes << :project unless notes.projects_loaded?
+ includes << :system_note_metadata unless notes.system_note_metadata_loaded?
if includes.any?
notes.includes(includes)