diff options
Diffstat (limited to 'app/controllers/projects/graphs_controller.rb')
-rw-r--r-- | app/controllers/projects/graphs_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index c80fce513f6..67d3f49af18 100644 --- a/app/controllers/projects/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -46,12 +46,8 @@ class Projects::GraphsController < Projects::ApplicationController def get_languages @languages = - if @project.repository_languages.present? - @project.repository_languages.map do |lang| - { value: lang.share, label: lang.name, color: lang.color, highlight: lang.color } - end - else - @project.repository.languages + ::Projects::RepositoryLanguagesService.new(@project, current_user).execute.map do |lang| + { value: lang.share, label: lang.name, color: lang.color, highlight: lang.color } end end |