Skip to content

Commit

Permalink
Merge pull request #69 from mansam/dont-break-refresh-if-flavor-is-mi…
Browse files Browse the repository at this point in the history
…ssing

Don't break refresh if a flavor couldn't be found
(cherry picked from commit f3ba0ffd038dea2d017d66e994b37a904450270f)

https://bugzilla.redhat.com/show_bug.cgi?id=1476279
  • Loading branch information
tzumainn authored and simaishi committed Jul 28, 2017
1 parent 7034888 commit 98a79bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def flavor_tenants(flavor)
tenants = []
# Add tenants with access to the private flavor
unparsed_tenants = safe_list { @connection.list_tenants_with_flavor_access(flavor.id) }
flavor_access = unparsed_tenants.data[:body]["flavor_access"]
flavor_access = unparsed_tenants.try(:data).try(:[], :body).try(:[], "flavor_access") || []
unless flavor_access.blank?
tenants += flavor_access.map { |x| @data_index.fetch_path(:cloud_tenants, x['tenant_id']) }
end
Expand Down

0 comments on commit 98a79bd

Please sign in to comment.