diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 00:08:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 00:08:00 +0300 |
commit | 69d6d3ca2013e97cfd2d89449669ea7bf475f4e9 (patch) | |
tree | 2cc4227ebfc52b7603691f06b0b8e09e030e8428 /app/serializers | |
parent | 01fdcf49b1553c22ae116fe96cedd7b91d02225c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/diffs_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/diffs_metadata_entity.rb | 2 |
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 |