diff options
author | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
---|---|---|
committer | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
commit | 87d01cc3bfc12c08024881dc8f13101e5430e3e6 (patch) | |
tree | 05e82defa51500257f97e3530862da03668895e3 /app/serializers/project_note_entity.rb | |
parent | fef5c923c009c64183cc43909444a1bdaba218b7 (diff) | |
parent | 71f3d48544cc0857c8d470b182f7e809de6a4642 (diff) | |
download | gitlab-ce-87d01cc3bfc12c08024881dc8f13101e5430e3e6.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into consolidate-page-widths-part02consolidate-page-widths-part02
Diffstat (limited to 'app/serializers/project_note_entity.rb')
-rw-r--r-- | app/serializers/project_note_entity.rb | 4 |
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 |