Commit 11204398 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Fix sidebar_details_block.vue and simplify build_metadata_entity.rb

parent 964933c9
......@@ -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) {
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment