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:
authorJan Provaznik <jprovaznik@gitlab.com>2018-09-07 16:39:20 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-09-07 16:39:20 +0300
commitd95c1f0335f7309114fcbb0d5413b28e1701a640 (patch)
tree6b22580a79dd1f929aecd158c31706ce3870c39b /app/serializers/project_note_entity.rb
parent81f4dc059db91577f72134e6008680b72029a29e (diff)
Use ResourceLabelEvent for tracking label changes
Diffstat (limited to 'app/serializers/project_note_entity.rb')
-rw-r--r--app/serializers/project_note_entity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/project_note_entity.rb b/app/serializers/project_note_entity.rb
index d7c4d0aacc6..f6cdea1d8b5 100644
--- a/app/serializers/project_note_entity.rb
+++ b/app/serializers/project_note_entity.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class ProjectNoteEntity < NoteEntity
- expose :human_access do |note|
+ expose :human_access, if: -> (note, _) { note.project.present? } do |note|
note.project.team.human_max_access(note.author_id)
end
@@ -9,7 +9,7 @@ class ProjectNoteEntity < NoteEntity
toggle_award_emoji_project_note_path(note.project, note.id)
end
- expose :path do |note|
+ expose :path, if: -> (note, _) { note.id } do |note|
project_note_path(note.project, note)
end