summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
commit69d6d3ca2013e97cfd2d89449669ea7bf475f4e9 (patch)
tree2cc4227ebfc52b7603691f06b0b8e09e030e8428 /app/serializers
parent01fdcf49b1553c22ae116fe96cedd7b91d02225c (diff)
downloadgitlab-ce-69d6d3ca2013e97cfd2d89449669ea7bf475f4e9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/diffs_entity.rb4
-rw-r--r--app/serializers/diffs_metadata_entity.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/serializers/diffs_entity.rb b/app/serializers/diffs_entity.rb
index 19875a1287c..88e09ae8c0b 100644
--- a/app/serializers/diffs_entity.rb
+++ b/app/serializers/diffs_entity.rb
@@ -42,13 +42,13 @@ class DiffsEntity < Grape::Entity
# rubocop: disable CodeReuse/ActiveRecord
expose :added_lines do |diffs|
- diffs.diff_files.sum(&:added_lines)
+ diffs.raw_diff_files.sum(&:added_lines)
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
expose :removed_lines do |diffs|
- diffs.diff_files.sum(&:removed_lines)
+ diffs.raw_diff_files.sum(&:removed_lines)
end
# rubocop: enable CodeReuse/ActiveRecord
diff --git a/app/serializers/diffs_metadata_entity.rb b/app/serializers/diffs_metadata_entity.rb
index c82c686e8ef..b7024721ea9 100644
--- a/app/serializers/diffs_metadata_entity.rb
+++ b/app/serializers/diffs_metadata_entity.rb
@@ -2,5 +2,5 @@
class DiffsMetadataEntity < DiffsEntity
unexpose :diff_files
- expose :diff_files, using: DiffFileMetadataEntity
+ expose :raw_diff_files, as: :diff_files, using: DiffFileMetadataEntity
end