Skip including a build if it doesn't exist.
This catches branch specifications where no build is available.
This commit is contained in:
parent
99395d85c1
commit
5081bb157f
|
@ -7,6 +7,7 @@ module Travis::Api::App::Responders
|
||||||
TEMPLATE_ERB = ERB.new <<-EOF
|
TEMPLATE_ERB = ERB.new <<-EOF
|
||||||
<Projects>
|
<Projects>
|
||||||
<% @resource.each do |r| %>
|
<% @resource.each do |r| %>
|
||||||
|
<% next if r.last_completed_build(branch).nil? -%>
|
||||||
<Project
|
<Project
|
||||||
name="<%= r.slug %>"
|
name="<%= r.slug %>"
|
||||||
activity="<%= ACTIVITY[r.last_completed_build(branch).state.to_sym] || ACTIVITY[:default] %>"
|
activity="<%= ACTIVITY[r.last_completed_build(branch).state.to_sym] || ACTIVITY[:default] %>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user