diff --git a/app/controllers/organizations/organizations_controller.rb b/app/controllers/organizations/organizations_controller.rb index 31300f1ea..3c4e64780 100644 --- a/app/controllers/organizations/organizations_controller.rb +++ b/app/controllers/organizations/organizations_controller.rb @@ -88,7 +88,7 @@ class Organizations::OrganizationsController < Organizations::BaseController projects = @organization.projects projects_count = @organization.projects.count - languages_hash = Rails.cache.fetch("query/organizations/languages/#{@organization.id}/#{projects_count}", :expires_in => 1.days) do + languages_hash = Rails.cache.fetch("query/organizations/languages/#{@organization.id}/#{projects_count}/2023", :expires_in => 1.days) do total_languages(projects) end @@ -97,7 +97,7 @@ class Organizations::OrganizationsController < Organizations::BaseController total_byte_size = sort_hash.values.sum # Rails.logger.info "languages_hash=============#{sort_hash}" sort_hash= sort_hash.transform_values { |v| - ActionController::Base.helpers.number_to_percentage((v / total_byte_size), precision: 1) + ActionController::Base.helpers.number_to_percentage((v * 100 / total_byte_size), precision: 1) }.select { |k, v| v != "0.0%" } render json: sort_hash end