summaryrefslogtreecommitdiff
path: root/app/serializers/codequality_degradation_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/codequality_degradation_entity.rb')
-rw-r--r--app/serializers/codequality_degradation_entity.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/serializers/codequality_degradation_entity.rb b/app/serializers/codequality_degradation_entity.rb
index be561052507..6289260465b 100644
--- a/app/serializers/codequality_degradation_entity.rb
+++ b/app/serializers/codequality_degradation_entity.rb
@@ -2,7 +2,9 @@
class CodequalityDegradationEntity < Grape::Entity
expose :description
- expose :severity
+ expose :severity do |degradation|
+ degradation.dig(:severity)&.downcase
+ end
expose :file_path do |degradation|
degradation.dig(:location, :path)