diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-03 16:58:56 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-04 16:11:17 +0200 |
commit | 11204398fbbd044ca587bb1b082ffbc1eaac2738 (patch) | |
tree | a607d1b4e1bf09ef98b18ee66a94a4ded7af993a /app | |
parent | 964933c9638c7d039a2843375d76c76c0b2cf25e (diff) | |
download | gitlab-ce-11204398fbbd044ca587bb1b082ffbc1eaac2738.tar.gz |
Fix sidebar_details_block.vue and simplify build_metadata_entity.rb44922-fix-build-metadata-creation
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/jobs/components/sidebar_details_block.vue | 2 | ||||
-rw-r--r-- | app/serializers/build_metadata_entity.rb | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/jobs/components/sidebar_details_block.vue b/app/assets/javascripts/jobs/components/sidebar_details_block.vue index 172de6b3679..af47056d98f 100644 --- a/app/assets/javascripts/jobs/components/sidebar_details_block.vue +++ b/app/assets/javascripts/jobs/components/sidebar_details_block.vue @@ -45,7 +45,7 @@ return `#${this.job.runner.id}`; }, hasTimeout() { - return this.job.metadata != null && this.job.metadata.timeout_human_readable !== ''; + return this.job.metadata != null && this.job.metadata.timeout_human_readable !== null; }, timeout() { if (this.job.metadata == null) { diff --git a/app/serializers/build_metadata_entity.rb b/app/serializers/build_metadata_entity.rb index 39f429aa6c3..f16f3badffa 100644 --- a/app/serializers/build_metadata_entity.rb +++ b/app/serializers/build_metadata_entity.rb @@ -1,8 +1,5 @@ class BuildMetadataEntity < Grape::Entity - expose :timeout_human_readable do |metadata| - metadata.timeout_human_readable unless metadata.timeout.nil? - end - + expose :timeout_human_readable expose :timeout_source do |metadata| metadata.present.timeout_source end |