Skip to content

Commit

Permalink
Do not fail if the method is not defined on the topology graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkremser committed May 2, 2017
1 parent 6285426 commit c1a1213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/topology_service.rb
Expand Up @@ -66,7 +66,8 @@ def map_to_graph(providers, graph)

relations.each_pair do |head, tail|
# Apply the generator graph's first node on the entity
children = entity.send(head.to_s.underscore.downcase)
method = head.to_s.underscore.downcase
children = entity.send(method) if entity.respond_to?(method)
next if children.nil?
# Push the child/children to the stack with the chunked generator graph
if children.respond_to?(:each)
Expand Down

0 comments on commit c1a1213

Please sign in to comment.