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:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-09-30 10:26:48 +0300
committerPaco Guzman <pacoguzmanp@gmail.com>2016-10-04 11:45:49 +0300
commita6e17cf50ecba47148307f8b05d0a73e9656a4c7 (patch)
treeed62f91bec38477c89a92010ae0eedd55936a6b5 /app/services/system_note_service.rb
parent4ff345c488c993e9f67f34ad271bc98a1f3ffa61 (diff)
Use SELECT 1, instead SELECT COUNT(*) to ask for notes existency
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index bf251816e7e..1ce66d50368 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -347,7 +347,7 @@ module SystemNoteService
notes = notes.where(noteable_id: noteable.id)
end
- notes_for_mentioner(mentioner, noteable, notes).count > 0
+ notes_for_mentioner(mentioner, noteable, notes).exists?
end
# Build an Array of lines detailing each commit added in a merge request