Skip to content

Instantly share code, notes, and snippets.

@jamesiarmes
Last active April 6, 2017 19:10
Show Gist options
  • Save jamesiarmes/fa6ebdc54c072724a24e54131d62323b to your computer and use it in GitHub Desktop.
Save jamesiarmes/fa6ebdc54c072724a24e54131d62323b to your computer and use it in GitHub Desktop.
diff --git a/lib/travis/client/entity.rb b/lib/travis/client/entity.rb
index d374e98..e7ee939 100644
--- a/lib/travis/client/entity.rb
+++ b/lib/travis/client/entity.rb
@@ -169,7 +169,12 @@ module Travis
end
def relations
- self.class.relations.map { |r| public_send(r) }.flatten(1)
+ relations = self.class.relations.map { |r| public_send(r) }
+
+ # Don't include nil relations to work around an issue where log_id may
+ # not be set.
+ # @see https://github.com/travis-ci/travis.rb/issues/493
+ relations.select { |r| !r.nil? }.flatten(1)
end
def restartable?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment