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:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 3e560a09fbd..ae4a8859d4d 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -107,6 +107,7 @@ class Note < ApplicationRecord
scope :fresh, -> { order_created_asc.with_order_id_asc }
scope :updated_after, ->(time) { where('updated_at > ?', time) }
scope :with_updated_at, ->(time) { where(updated_at: time) }
+ scope :with_suggestions, -> { joins(:suggestions) }
scope :inc_author_project, -> { includes(:project, :author) }
scope :inc_author, -> { includes(:author) }
scope :with_api_entity_associations, -> { preload(:note_diff_file, :author) }
@@ -319,7 +320,7 @@ class Note < ApplicationRecord
return commit if for_commit?
super
- rescue
+ rescue StandardError
# Temp fix to prevent app crash
# if note commit id doesn't exist
nil
@@ -495,7 +496,7 @@ class Note < ApplicationRecord
noteable&.expire_note_etag_cache
end
- def touch(*args)
+ def touch(*args, **kwargs)
# We're not using an explicit transaction here because this would in all
# cases result in all future queries going to the primary, even if no writes
# are performed.
@@ -638,4 +639,4 @@ class Note < ApplicationRecord
end
end
-Note.prepend_if_ee('EE::Note')
+Note.prepend_mod_with('Note')