diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-03-22 17:52:28 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-03-28 13:59:56 +0200 |
commit | 973e4030b13adbcc4eb7fad347b928a5164a04ff (patch) | |
tree | 2583fbd29dce1b6dde4b7a6b26525e7d27cf7d32 /app/serializers | |
parent | 7d7b0688b846e346a0799340875d459d26c1718d (diff) | |
download | gitlab-ce-973e4030b13adbcc4eb7fad347b928a5164a04ff.tar.gz |
Refactor build_metadata
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/build_details_entity.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 99ca0bd158b..ca4480fe2b1 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -5,9 +5,7 @@ class BuildDetailsEntity < JobEntity expose :runner, using: RunnerEntity expose :pipeline, using: PipelineEntity - expose :metadata, using: BuildMetadataEntity do |build| - build.ensure_metadata - end + expose :metadata, using: BuildMetadataEntity expose :erased_by, if: -> (*) { build.erased? }, using: UserEntity expose :erase_path, if: -> (*) { build.erasable? && can?(current_user, :erase_build, build) } do |build| |